up vote 0 down vote favorite
2
share [g+] share [fb]

I'm using Debian Lenny and I want to tunnel rtorrent only through a OpenVPN tunnel.

I have a tunnel running, the config file looks like this:

client
dev tun
proto udp
remote openvpn.xxx.com 1194
resolv-retry infinite
nobind
persist-key
persist-tun
ca /etc/openvpn/xxx/keys/ca.crt
cert /etc/openvpn/xxx/keys/client.crt
key /etc/openvpn/xxx/keys/client.key
tls-auth /etc/openvpn/xxx/keys/tls.key 1
ns-cert-type server
comp-lzo
verb 3
auth-user-pass
script-security 3
reneg-sec 0

My idea is that I could run a sockd proxy internally that redirects traffic to the openvpn tunnel. I could use the *nix "proxifier" application "tsocks" to make it possible for rtorrent to connect through that proxy (as rtorrent doesn't support proxies).

I have trouble configuring sockd as my IP inside the VPN changes every time I connect. This is a config file someone said would help: http://ircpimps.org/sockd.conf As my IP changes at each connect I don't know what to put in that config file. I have no control over the host side config file.

Any help wanted. Any other method is very welcome.

link|improve this question
feedback

2 Answers

One other way to solve it could be to use socks ower ssh (ssh -D portnumber) which works fine with tsocks.

link|improve this answer
feedback

A SOCKS proxy is probably not the best tool for this job. The way I have this set up is:

  1. Run rtorrent as a specific user
  2. Use iptables to forward traffic from that user over the VPN

The question is mainly if you want to run rtorrent as a different user. You are most likely running it inside screen, and screen is not a big fan of su'ing to it's user. It is doable, but an extra thing you will need to figure out.

When researching this exact question for my setup, I found it to be extremely hard to limit the OpenVPN on a process-level. If you can find a way to make it work, I would sure be interested.

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

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