Comments (6)
The problem here is that ExpressVPN only uses for now IPv4 as far as I know. So it's the only option really. So in order to check if the IPs are different I can for now base it on IPv4, unless I missed the point.
from expressvpn.
I believe that's true. The issue is that getent
seems to grab the IPv6 address if one is listed for the DDNS domain (unrelated to the ExpressVPN IP). Didn't track down how to fix that.
from expressvpn.
I didn’t check it yet but in such case using getent ahostsv4 DOMAIN might be better instead of using hosts option
from expressvpn.
ahh, you might be right.
worth noting, for me, any of these commands return multiple addresses (with an inconsistent order), and ahostsv4
returns multiple lines per address.
also, i just learned cloudflare has the option to proxy traffic to DDNS hosts, which has various benefits, but also breaks this script (lol).
starting to wonder if there's not a better solution all together. perhaps a script on the host or in a separate container that gets the host IP via curl api.ipify.org
or similar, and writes it to a file, which the expressvpn container can bind mount.
not gonna debug this anymore myself though. just realized my expressvpn subscription is expiring soon. your changes for the other issue were super helpful, and will be enough for me till then. thanks!
from expressvpn.
If you are willing still to check then maybe the command like this would be better
dig DOMAIN +short A
it should return just ip, but if there are multiple ip we can add at the end | head -1
but still I can't guarantee the order of IPs it will return. Usually, for DDNS scenario it should have just one IP.
Or with dig we can also check any other record of the domain so your IP could be then hidden in text field or something and then we can extract it from there. Less ideal but still doable solution:
dig DOMAIN +short TXT
but then from the updating it perspective I have no idea at this moment how to do so.
EDIT: On the other hand if the issue is with how many IPs is returned, the question is why there is more than one and they are different, I think in normal scenario it should return just one IP (or multiple but the same addresses) cause it should be used just for DDNS, or am I mistaken?
If the above is correct then using getent ahostsv4 DOMAIN | head -1 | awk '{ print $1 }'
OR getent ahostsv4 DOMAIN | grep "STREAM" | awk '{ print $1 }'
will be better so no extra packages are needed.
from expressvpn.
hmm
dig DOMAIN +short A
also shows both IPv4 addresses -- but you're right, that's probably not something to worry about, since there's nothing that can be done about it here. if i turn off cloudflare's proxy setting for my DDNS domain (which i would have to do anyway, for the script to work), only one entry is returned.
i agree about the second command, no need to install extra things, and that should solve the IPv6 problem :)
worth noting that, if there are two IPv4 entries, grepping for STREAM
will return two lines -- so the behavior of the two getent
commands will be slightly different in this case -- but either way the script won't be doing what it's supposed to -- so it really is on the person setting things up to make sure that queries aren't returning multiple entries. i suppose you could test for this, and issue a warning... only if you think it's a problem people besides me will run into though :)
from expressvpn.
Related Issues (20)
- client container seems to bypass expressvpn HOT 11
- Sometimes activation fails HOT 11
- QNAP - Unable to connect issues. HOT 20
- ExpressVPN won't activate.
- Connect host LAN device to published port? HOT 1
- Error: Could not resolve host HOT 1
- Running on RPI with kernel 6.x+ but it says my kernel version is below 4.9 HOT 8
- Run on Kubernetes HOT 1
- "please activate your account" HOT 31
- run as non-privleged HOT 1
- Service failing to start - any ideas? HOT 6
- Any way to build a socks5 proxy server on this? HOT 2
- Feature request: HTTP controls (feature parity with glutun) HOT 3
- Feature request: Add Net-tools HOT 6
- service expressvpn restart failed ! HOT 34
- Trying to understand how the heathchecks.io integration works HOT 3
- docker compose `command` never executes HOT 5
- if ExpressVPN fails to connect, traffic will be routed through the host network HOT 7
- latest version restart loop HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from expressvpn.