Bind to IP

General support for problems installing or using Deluge
Post Reply
dcoryh192
New User
New User
Posts: 4
Joined: Thu Jun 12, 2014 2:34 pm

Bind to IP

Post by dcoryh192 »

Hi,

I am trying to get Deluge working with my VPN setup. I am using TorGuard OpenVPN config files with OpenVpn 2.3.2 on Ubuntu 14.04. Deluge is v1.3.7 (libtorrent 0.16.17.0). I have achieved moderate success so far.

My goal is to have the VPN always running so that my deluge traffic uses it, but let everything else on the machine use my eth0 interface. Deluge is run as a daemon under deluge-x user, and I typically use a client installed on a windows PC to manage the daemon.

Deluge only works with nothing set under Interface. If I try to set 10.15.0.37 or 10.15.0.1, then I see the active port change to 0 and nothing downloads. If I leave it as default, with the vpn server up as shown below, then I believe it is captured under the 128.0.0.0/1 route that the vpn makes. In this case, it works, but slower, and trackers don't work. I would like to be able to remove the 128.0.0.0/1 route because it is conflicting with another instance of deluged (for private trackers that can't go through a VPN). Removing the 128.0.0.0/1 route causes everything to fail since Deluge apparently just won't bind to anything except the default interface.

Is there anything that I am doing wrong or a patch that I have missed? I have been scratching my head on this for months with no significant headway. I really like Deluge and the way the daemon + client setup works, so I don't want to have to switch torrent clients.

Thanks!

I have IP tables set with

Code: Select all

iptables -A OUTPUT -m owner --uid-owner deluge-x -d 192.168.2.0/24 -j ACCEPT
iptables -A OUTPUT -m owner --uid-owner deluge-x \! -o tun0 -j REJECT
my OpenVPN setup is:

Code: Select all

client
dev tun
proto udp
remote nl.torguardvpnaccess.com 443
resolv-retry 5
nobind
fast-io
tun-mtu 1500
tun-mtu-extra 32
mssfix 1450
persist-key
persist-tun
ca globalca.crt
auth-user-pass login.key
comp-lzo
route-delay 5 30
route-up "/etc/openvpn/route-up.sh"
script-security 3 system
mute-replay-warnings
verb 3
route-up.sh:

Code: Select all

#!/bin/bash
#Delete default routes set by OpenVPN
/sbin/ip route del 0.0.0.0/1
#/sbin/ip route del 128.0.0.0/1
#Uncommenting this last line causes deluge to completely stop connecting
Output of route (with VPN connected and route-up.sh run):

Code: Select all

Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
0.0.0.0         192.168.2.1     0.0.0.0         UG    0      0        0 eth0
10.15.0.1       10.15.0.37      255.255.255.255 UGH   0      0        0 tun0
10.15.0.37      0.0.0.0         255.255.255.255 UH    0      0        0 tun0
80.82.70.202    192.168.2.1     255.255.255.255 UGH   0      0        0 eth0
128.0.0.0       10.15.0.37      128.0.0.0       UG    0      0        0 tun0
172.16.1.0      0.0.0.0         255.255.255.0   U     0      0        0 vmnet8
172.16.25.0     0.0.0.0         255.255.255.0   U     0      0        0 vmnet1
192.168.2.0     0.0.0.0         255.255.255.0   U     1      0        0 eth0
Post Reply