Hello guys,
I have an script which sorts out bad server pairs and als tries to verify
Tunnel problems with an check from the external ip and the nym endpoint one.
Like this(its only a snippet);:
S=“$(nym-vpnc status 2>/dev/null)”; E=“$(printf ‘%s\n’ “$S” | grep -oE ‘[0-9]+(\.[0-9]+){3}:[0-9]+’ | sed -n ‘2{s/:.*//;p}’)”; P=“$(curl -4 --connect-timeout 8 --max-time 15 -sS https://api64.ipify.org 2>/dev/null)”; [ -n “$E” ] && [ -n “$P” ] && { [ “$E” = “$P” ] && echo “[MATCH] Nym exit=$E public=$P” || echo “[MISMATCH] Nym exit=$E public=$P”; } || echo "[ERROR] Could not determine both IPv4 addresses.
Short explanation what this one liner do:
It compares the Endpoint from the Status Nym-vpnc Command with the External one from an api Adress.
**If matches, then it estimates, that there is no issues with the connection.
*
*If it doesnt match then it estimates, that the Nym Gateway has some issues with the connection and may route the Data outside of the Tunnel.
Is this an reliable approach to sort out servers with routing problems ?
Best regards