Tell me more ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I'd like to insure that transmission only sends/receives traffic when the server it runs on is connected to a VPN.

I found this question which is similar but I don't want to force all traffic through the VPN and I haven't been able to find a good guide on how to use firestarter from the command line.

Instead I was thinking of using ufw, but I have little to no experience with firewalls, and I'm hopping the community can help me out.

One idea I had would be to force transmission to use a specific port, say 33442, and then only allow traffic to and from that port from the IP address of the VPN server. I checked out the Ubuntu server guide and I think could do something like this:

sudo ufw enable
sudo ufw deny port tcp from localhost to any port 33442
sudo ufa allow port tcp from localhost to VPNIP port 33442
sudo ufw deny port udp from localhost to any port 33442
sudo ufa allow port udp from localhost to VPNIP port 33442

Does this logic hold it's salt? How would you do it? What would I use for VPNIP, the public IP of the VPN server, or should I specify the local subnet range that the VPN connects me to?

Thanks for your help!

share|improve this question

2 Answers

Ideally you should use a torrent client that has a feature to bind to a specific interface (the VPN interface).

Among torrent clients, Deluge does this. So you can install Deluge and configure the interface in the Preferences and you are set!

share|improve this answer
Thanks for your answer. I'm actually pretty set on using Transmission for the moment though, do you know if it's possible to bind to specific interface or IP range (so it only uses the VPN) with Transmission? Thanks! – Evan Apr 29 '11 at 21:02
@user4124 Do you know how to bind Deluged to a specific network interface via the command line or the webui? Since no one seems to know how to do this with Transmission, I've been trying Deluge but haven't had luck so far. Thanks! – Evan May 3 '11 at 1:43
1  
@Evan you can specify ip address to bind to in Deluge with listen_interface in deluge-console or Interface in Network options. – Cas Jun 25 '11 at 21:29
@Cas, thanks, i'll try that! – Evan Jun 30 '11 at 21:39
sudo groupadd vpnroute
sudo iptables -A OUTPUT -m owner --gid-owner vpnroute \! -o tun0 -j REJECT
sudo -g vpnroute transmission-gtk &
share|improve this answer

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.