GUI Displayed IP Address

General support for problems installing or using Deluge
Doctor.Corndog
Member
Member
Posts: 11
Joined: Wed Jul 06, 2022 10:42 pm

GUI Displayed IP Address

Post by Doctor.Corndog »

Quick question. When I am attached to the GUI or if I launch deluge-console from a terminal in Ubuntu, Deluge will display an IP address at the bottom. This IP address, even when I am connected to my VPN and have verified my VPN IP, remains my real IP address.

Where is this GUI displayed IP derived from and does anyone know if it should show your VPN address when connected.
mhertz
Moderator
Moderator
Posts: 2215
Joined: Wed Jan 22, 2014 5:05 am
Location: Denmark

Re: GUI Displayed IP Address

Post by mhertz »

For me it shows the VPN IP, though at times it can show 'n/a', and would personally be worried if showed otherwise.

I believe deluge itself doesn't do anything regarding this, except it monitors for libtorrents external_IP_alert and shows that value in it's UIs and 'n/a' when not retrieved.

Libtorrent gets this value, from looking at several different sources and using a votes mechanisme, to determine it in certain certability. These votes comes from dht peers supporting retunring your ip, swarm-peers supporting that, trackers supporting that and routers nat-pmp supporting that, and when it's algo satisfied then shows it. Atleast worked like that some years ago I read from lead-dev of libtorrent.

If starting deluge here with no torrents and dht on, then will show IP(of vpn if vpn on, otherwise real IP), but if dht off, then will show 'n/a', meaning vote comes from dht network here, and so I wouldn't like publishing my un-vpn'ed IP to dht network when vpn enabled.

It sounds little like you have "split-routing" configured, or however to say it, i.e. you're not overriding default route seemingly/maybe with VPN IP and so then need bind torrent client to VPN in that case, or change setup. What does "curl ifconfig.co" state when vpn on, or instead can check it from myip.com website?
Doctor.Corndog
Member
Member
Posts: 11
Joined: Wed Jul 06, 2022 10:42 pm

Re: GUI Displayed IP Address

Post by Doctor.Corndog »

Crap. I just ran out for errends, but I will check when I get back. The fact that your display shows the VPN IP address in mind is not definitely concerns me. Thanks so much for reaching out I’ll get back to you as soon as I can.
Doctor.Corndog
Member
Member
Posts: 11
Joined: Wed Jul 06, 2022 10:42 pm

Re: GUI Displayed IP Address

Post by Doctor.Corndog »

I think I know what you’re asking. If I perform a curl to a website to check my IP/Country code, it’s coming back with the VPN address and CA, which is where I am connecting.

I have a cron running ever minute to perform this check and reboot my system in the event that it does not come back with the country code “CA” as a fail safe.

I’ll start reading up on libtorrent I guess. Do you have config files you recommend I start checking in the meantime?
mhertz
Moderator
Moderator
Posts: 2215
Joined: Wed Jan 22, 2014 5:05 am
Location: Denmark

Re: GUI Displayed IP Address

Post by mhertz »

You're welcome :)

I'm glad you posted btw, as I actually see same now! I always bind to VPN specifically, and kinda forgot that when posting initially and just rechecked without and indeed shows my real IP!

I will have to investigate further, as this isn't good obviously. I checked ipmagnet website and it gives out both my real IP and my VPN IP to peers in swarm!

I'm pretty sure this is because a change in libtorrent after v1.2.4 or something, regarding multi-homing, and there's a big thread at libtorrent github a few years ago I submitted when found, but it was decided by lead-dev that it was up to us to to bind to VPN and not libtorrent, since needed support ipv4/ipv6 dual-stack etc networks. I did post a warning about it in windows section here, because in my testings it only affected windows, when using client without killswitch/hardcoded routing, but seemingly this has changed. I use openvpn opensource client btw.

Here's that thread btw: https://github.com/arvidn/libtorrent/issues/4803

Thanks for posting!

Edit: Posted after you :)
Doctor.Corndog
Member
Member
Posts: 11
Joined: Wed Jul 06, 2022 10:42 pm

Re: GUI Displayed IP Address

Post by Doctor.Corndog »

When I have some time later tonight I’ll check out the link to the thread you shared. I’m glad I’m not the only person having a session. I was starting to freak out, but it sounds like maybe I should be freaking out a little bit.

So basically I need to set up some IP tables to bind Deluge to my VPN, is what you are saying? I just recently put this server together to replace a failed one which I had for years. Oddly enough, what seemed like an easy task resulted in no torrent traffic when I attempted to set up IP tables. Guess I need to sit down and dedicate some time into revisiting that.
mhertz
Moderator
Moderator
Posts: 2215
Joined: Wed Jan 22, 2014 5:05 am
Location: Denmark

Re: GUI Displayed IP Address

Post by mhertz »

I forgot before state i'm sorry for posting wrong info, sorry! :) (Insinuating only you had issue and not normal)

Anyway, you should be good I believe by under deluge preferences entering VPN interface name under incoming-interface and outgoing-interface, e.g. tun0 here. Or the local IP of the VPN instead of interface-name if preferred instead. If wanted can further add iptables, but in theory it should be fine just binding, or so I believe atleast - also tested ipmagnet and with binding, so adding 'tun0' here, then only the VPN IP sent to swarm.

Btw, with binding to VPN, then still sometimes lists 'n/a' in deluge, but still correct VPN IP sent out.

When not binding VPN IP, then sometimes it lists in deluge the real IP, sometimes the VPN IP and sometimes 'n/a', in 10 or so startups I tried, but always sends out both real and VPN IP to swarm unfortunetly.

Hope help.
Doctor.Corndog
Member
Member
Posts: 11
Joined: Wed Jul 06, 2022 10:42 pm

Re: GUI Displayed IP Address

Post by Doctor.Corndog »

I’ll definitely start with just binding the interface in preferences to tun0. Didn’t even notice that the first time. Like I said it’s been awhile since I had to set all this up. Thanks again for your help!!
mhertz
Moderator
Moderator
Posts: 2215
Joined: Wed Jan 22, 2014 5:05 am
Location: Denmark

Re: GUI Displayed IP Address

Post by mhertz »

You're very welcome mate - Thank you again for raising this issue here, as I didn't know and is important info.

Cheers :)
Doctor.Corndog
Member
Member
Posts: 11
Joined: Wed Jul 06, 2022 10:42 pm

Re: GUI Displayed IP Address

Post by Doctor.Corndog »

Interesting. When I set tun0 as my incoming/outgoing interface in confit, it doesn’t take? It just resets to blank when I hit apply.

This is also Deluge 2.1.0 for client
2.1.1 for server.

Upgraded the client to match and still nothing.
Post Reply