2

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, I've tried the adapter name and I've tried adding a star after the IPs but I haven't have any luck.

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

Thank you all in advance,

Ash.

wogsland
  • 441
  • 3
  • 7
  • 16
Ash
  • 123
  • 5

1 Answers1

1

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.

Igor Hatarist
  • 2,171
  • 1
  • 17
  • 13
  • 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. – Igor Hatarist 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