Setting source port for outbound connections?

General support for problems installing or using Deluge
Post Reply
Krellan

Setting source port for outbound connections?

Post by Krellan »

I'm a new user of Deluge, and it's a good program so far.

I can set the port range for the listening socket to listen on, for inbound connections. This works.

However, I can't seem to influence the port range at all for outbound connections.

I'd like to set a source port range for outbound connections. When new outbound connections are initiated, the source port would be bound to something in a given range, as the outbound connection is made.

The reason for this is to better identify BitTorrent packets on my network. If I can keep both inbound and outbound connections within a known port range, I can set up filtering rules.

I have 2 upstream ISP's. One is slow, but is unmetered: the "turtle". The other is fast, but hates BitTorrent: the "hare".

So, I want to keep all BitTorrent to only use the "turtle" ISP.

On my load balancer, I can easily set rules to force outbound traffic to use the ISP of my choice, by setting up filter rules based on source port numbers.

This is the natural complement to my firewall, which routes inbound traffic based on destination port numbers.

So, if I could do this for both directions of traffic, I'd be able to completely work around the problem of not having good BitTorrent support on one ISP.

Is there a way to do this within Deluge?
Post Reply