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.

Basically i have a PPTP VPN connection on my linux box (Raspberry Pi on Raspian) and I have Deluge installed with the WebUI. The client is fantastic, really love it and the functionality that comes with it but i really want to get the traffic (downloading and uploading) forced down my VPN adapter. In the WebUI under network I have tried giving the inet address listed in ifconfig, I have tried the P-T-P address from ifconfig, I have tried giving the direct vpn address, ive tried the adapter name and ive tried adding a star after the IPs but i havent have any luck.

Does any one have any idea of the quickest and easiest way of doing this? Ive tried routing as well but it was a bit unreliable...

Thank you all in advance,

Ash.

share|improve this question

1 Answer 1

up vote 1 down vote accepted

You can use the owner netfilter module. For example, run deluged as a deluge user and then apply the rule:

iptables -A OUTPUT -m owner --uid-owner deluge \! -o tun0 -j REJECT

It will reject everything except connections to tun0 for any processes under deluge user.

share|improve this answer
    
This sounds exactly what i need thank you for such a quick response, only issues im getting now is - iptables v1.4.14: unknown option "--cmd-owner". Do you know how to resolve this? –  Ash Jul 31 '13 at 13:26
    
@Ash I'm very sorry, seems that cmd-owner is a deprecated argument and was removed. Instead, use the uid-owner (or gid-owner) that will identify process by user/group respectively. –  IOXenus Jul 31 '13 at 13:37
    
Ahh fantastic got this set up and working now, but have a different issue now with my VPN traffic not moving :-( Thank you so much! –  Ash Jul 31 '13 at 17:08

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.