console external IP

General support for problems installing or using Deluge
Post Reply
lmp
New User
New User
Posts: 2
Joined: Mon Apr 01, 2019 6:30 am

console external IP

Post by lmp »

Hello!
First of all - happy New Year! :ugeek:

I'm looking to create some "kill script" if for some reason (not important what reason) VPN fails and torrent starts to use my provider's external IP instead of the VPN IP.

My setup is split - I have deluged running on a separate Linux host and a few thin clients as UI for ease of use. I have set up split tunnel VPN so only external traffic for deluged is routed to VPN - local traffic is still local.
So the best way to determine if the external IP is a VPNs or not is to ask Deluge for an external address. In the Windows thin client I can see easily it in the status bar, but is there any way to get it from the console?
I have played with deluge-console but unfortunately, I can't get it to show external IP.
To be honest I couldn't find any informative documentation about deluge-console, only basic help similar to Linux man pages where I can't see anything of particular interest.

As it won't be specific enough I don't consider checking for the tun interface if it's up and connected, there are too many other things in the setup that can fail at some point.

Any ideas or help on how to get the current external IP from deluged?

Thanks & best regards!
User avatar
ambipro
Moderator
Moderator
Posts: 445
Joined: Thu May 19, 2022 3:33 am
Contact:

Re: console external IP

Post by ambipro »

i use docker, and with docker you can use binhex's vpn container and its secure, however its a completely different setup than you have and are probably familiar with so maybe someone else has an idea that would be better suited.
mhertz
Moderator
Moderator
Posts: 2215
Joined: Wed Jan 22, 2014 5:05 am
Location: Denmark

Re: console external IP

Post by mhertz »

Console-UI don't support that I believe, well you can open the curses version and look at the bottom, on linux, but not scriptable I believe.

You can get it from a client script, through either the core python API or web-ui API, but before I go post you an example, then seriously reconsider imho, as way to insecure doing it that way and will have atleast a sec+ with connections going outside VPN. Imho look into either namespaces or iptables rules, and you can also bind your tun interface for deluged, though I would do the former additionally, just for extra piece of mind, but should be all that is needed in reality, so depends on your paranoia level, binding in/out to vpn I mean, in deluge preferences. Also a docker like binhex's, as ambipro suggested is good option, depending if preferring use dockers or not of-course. Anyway, there are a bunch of info and threads on these subjects so google is your friend also ;)
Post Reply