Network interface binding

Specific support for Deluge on Microsoft Windows OS
Post Reply
TheShanMan
Leecher
Leecher
Posts: 56
Joined: Sun Jun 23, 2013 4:16 pm

Network interface binding

Post by TheShanMan »

I have the interface field set to 10.*.*.* (I read somewhere that that's the right format). I disconnected from my VPN (which runs on 10.*.*.*) to see if traffic would stop, but when I look at Process Explorer, I see traffic on 192.168.*.* which is my physical adapter address (if not familiar with Process Explorer, green lines show newly opened connections and red lines show closed connections). Why is that? Is it not working?
deluge.png
deluge.png (28.17 KiB) Viewed 28559 times
mhertz
Moderator
Moderator
Posts: 2182
Joined: Wed Jan 22, 2014 5:05 am
Location: Denmark

Re: Network interface binding

Post by mhertz »

I can't speak for the connections made in your pic, but in general, deluge1 only supports binding libtorrents listen_interfaces option and not outgoing_interfaces, though deluge2 does. When only binding the listen_interfaces, then according to the docs, you have effectively bound to your VPN the incoming peer uTP/TCP connections, outgoing peer uTP and UDP tracker connections and DHT nodes, however as outgoing connections not bound, then outgoing TCP connections still allowed to circumvent VPN.

You could i'm guessing use ltconfig plugin to bind outgoing_interfaces to your VPN on deluge1, and note you can if doing this, use a GUID of your interface instead of local IP(changing all the time ussually), just need uppercase it and in curlybraces(GUID can be gotten through e.g. running from elevated cmd: 'net start dot3svc & netsh lan show interfaces & net stop dot3svc').

You could also make use of the windows firewall(or a third-party one) to restrict VPN access/kill-switch, so you make a couple rules for deluge app, only allowing in/out from a subnet address of your local VPN(subnet so as making room for the IP changing to occure without modifications needed) and blocking everything else.
TheShanMan
Leecher
Leecher
Posts: 56
Joined: Sun Jun 23, 2013 4:16 pm

Re: Network interface binding

Post by TheShanMan »

Thanks! I was meaning to check out ltconfig and forgot so I appreciate that reminder. And I know people have used iptables in linux to do this sort of thing but I didn't realize the windows firewall could do that. I also found out about a program called ForceBindIP which might be an option. Hopefully one of these approaches will be a good solution!
TheShanMan
Leecher
Leecher
Posts: 56
Joined: Sun Jun 23, 2013 4:16 pm

Re: Network interface binding

Post by TheShanMan »

Hmmm... I'm not seeing that setting in the ltconfig list, nor can I find any setting that looks like it would be the right one. What am I missing?
mhertz
Moderator
Moderator
Posts: 2182
Joined: Wed Jan 22, 2014 5:05 am
Location: Denmark

Re: Network interface binding

Post by mhertz »

Are you saying that you not see outgoing_interfaces, but see listen_interfaces? Maybe ltconfig in older versions couldn't retrieve that setting for some reason, or outgoing_interfaces is maybe a newer concept not in older libtorrent's e.g I believe deluge 1.3.15 on windows uses 1.0.11 or something, have never checked or looked into that, sorry if stating wrong info to you then, if that's the case. You could if wanted try update libtorrent and see if that makes a difference, curtesy of MikeMelbAustralia here: viewtopic.php?f=12&t=55859

Edit: The libtorrent changelog states atleast a reference to that option being available in in v1.0.9 and googled deluge 1.3.15 uses v1.0.11.

Edit2: Sorry, it seems I was wrong, as found a quote by Arvid stating
There's a different setting, in RC_1_1, outgoing_interfaces which it sounds like you're after. In previous versions of libtorrent it was a function call use_interface().

Source: https://github.com/arvidn/libtorrent/issues/1605.

He still stated there that listen_interfaces always just was for incoming connections, so only half the equation imho.

The changelog stated changes made in 1.0.9 about when outgoing interfaces defined, which I thought meant outgoing_interfaces but then must been that use_interface() call. Sorry for wrong info. As stated you could try the 1.1.14 update from MikeMelbAustralia. Lastly, it could probably be hacked into the source-code pretty easilly I'm guessing, I mean hardcoding that option(in deluge I mean), with an updated libtorrent in-place.
TheShanMan
Leecher
Leecher
Posts: 56
Joined: Sun Jun 23, 2013 4:16 pm

Re: Network interface binding

Post by TheShanMan »

Thanks for confirming I'm not blind or dumb. Haha! I'll see what I can do with the firewall and/or ForceBindIP first.
showstoppre
New User
New User
Posts: 7
Joined: Mon Apr 26, 2021 6:25 am

Re: Network interface binding

Post by showstoppre »

TheShanMan wrote: Sat Jul 31, 2021 4:53 pm I have the interface field set to 10.*.*.* (I read somewhere that that's the right format). I disconnected from my VPN (which runs on 10.*.*.*) to see if traffic would stop, but when I look at Process Explorer, I see traffic on 192.168.*.* which is my physical adapter address (if not familiar with Process Explorer, green lines show newly opened connections and red lines show closed connections). Why is that? Is it not working?

deluge.png
Could you please tell me how to get GUI for deluged-debug.exe, like in your screenshot?

Also, I'm not seeing any connectivity details in log.txt.

Thanks

Edit: My bad, the screenshot is from Process explorer.
Post Reply