Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I'm using pfsense for prioritizing traffic around LAN. It works well for specified port, IP, network, but I'm having a problem with torrent (transmission bittorrent) outbound connections. The outbound connections are random and no filter can be specified to slow them down if needed.

So I was thinking was it possible to specify a virtual IP just for the transmission daemon so I could use separate rules just for that IP?

The example would be:

Machine IP:          192.168.0.1
Transmission Daemon: 192.168.0.2

If not, what are the other solutions?

share|improve this question
add comment

2 Answers 2

This link has similar question consisting torrent and pfsense.

I think it is possible to set outbound ports in utorrent. Look for net.outbound_port and net.outbound_max_port.

For linux qBittorrent is equivalent to utorrent.

To use another IP address for particular service. Set a virtual IP and put rule in iptables to SNAT packets originating from particular port or range of ports.

share|improve this answer
    
I saw that link when I was searching for the solution. I would prefer to continue using transmission. So you're saying that it is possible to set some kind of virtual ip to a service/daemon? If so, how? –  enedene Nov 23 '11 at 9:46
    
I do not know is it possible to set outbound port range in transmission and if yes, how. Suppose it is possible($PORTSTART-$PORTEND) then you can add one more virtual ip($IP2) to the system and then create iptables rule such as iptables -t nat -A OUTPUT -p tcp --source-port $PORTSTART:$PORTEND -j SNAT --to-source $IP (replace udp if using udp ports), so that your firewall will get originationg ip as IP2. –  Sachin Divekar Nov 23 '11 at 12:10
    
Unfortunately it's not possible in transmission to set outbound range of ports, although the feature has been requested a while ago. Yes, I can change the torrent that has such option, however I'm interested if this is possible in general. –  enedene Nov 23 '11 at 13:06
    
Yes it is possible like I said above. –  Sachin Divekar Nov 23 '11 at 13:17
    
There is no option in settings.json in transmission where you can specify the range of outbound connections. Yes, you can set outbound connections via IP tables, but transmission will use everything from 1-65535. –  enedene Nov 23 '11 at 17:22
show 1 more comment

To use an ad-hoc ip-address to monitor/limit a service is usually a good technique but the service has to support it.

You are lucky, TrasmissionBT supports it :-)

Check this page of transmission wiki. Look for bind-address-ipv4 and bind-address-ipv6 options.


It seems that I was wrong on this. I found a good solution for you in this superuser question: How to use different network interfaces for different processes?

Look ad akira solution. He proposes to use an ad-hoc library to intercept bind system call.

share|improve this answer
    
That only works for inbound connections which are not a problem, I can easily control traffic for a specific port, but not for a random outbound port. –  enedene Nov 23 '11 at 17:19
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.