From 350f2e8d631ad49d693129749a2fcc7caf837993 Mon Sep 17 00:00:00 2001 From: Alfonso Date: Mon, 20 May 2024 15:54:12 +0200 Subject: [PATCH] Resolved IP fixed Changed to detect ipv4 in dual-stack networks --- compiled.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compiled.sh b/compiled.sh index 5955c06..c379319 100755 --- a/compiled.sh +++ b/compiled.sh @@ -1170,7 +1170,7 @@ function TestHostname { OPEN_PORT_53=$(echo "quit" | timeout 1 telnet 8.8.8.8 53 2> /dev/null | grep "Escape character is") if [[ "$OPEN_PORT_53" != "" ]] && command -v dig >/dev/null 2>&1 then - EXTERNAL_IP=$(dig +time=1 +tries=1 +retry=1 +short myip.opendns.com @resolver1.opendns.com | tail -n1) + EXTERNAL_IP=$(dig -4 +short myip.opendns.com @resolver1.opendns.com) IP=$(dig @8.8.8.8 +short $HOSTNAME | tail -n1) else