Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I'm running a server at home with rtorrent and apache2. I would like to route my rtorrent traffic via OpenVPN and since im kinda new to OpenVPN and iptables i would like to have a user friendly guide.

What i've tried: I've been googling for a week on the subject but i havent found anything that could help me. I have tested the tunnel with openvpn and it routes my ip correct but heres the problem. Since i run a apache2 server it stops working (of course) when the tunnel is active.

What i want: I want the tunnel to be active but not to be default and that only rtorrent traffic should pass through it and last but not least that rtorrent ONLY should connect over VPN.

Anyone up for the task of teaching me?

share|improve this question
    
Anyone that can help me with this? –  junkyhlm Jan 7 '13 at 14:59
    
You are correct, you will have to adjust your routing table accordingly, however I will need more info to post a formal answer for you, how many network adapters do you have? I'm assuming this machine with rtorrent is going to be the OpenVPN client and you have an OpenVPN server somewhere? –  BigHomie Jan 16 '13 at 16:06

1 Answer 1

up vote 1 down vote accepted

I've managed to solve this with two main steps:

  1. Choose a service provider that uses TUN interface.
  2. A little bit more table routing

The Table routing

I've read the most useful howto over at http://lartc.org/howto/ and followed the provided steps there.

My setup is now two physical nic (eth0 and eth1) divided over three tables (main, T1 and T2). T1(eth1) routes the default stuff (apache2, ssh etc.) and T2(eth0) is just for rtorrent connections.

It works like a charm. So if you have the same issue read up over at lartc.org and the problem will be solved.

Note

I have not tried this config with TAP interface so I cannot say if it works or not.

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.