From 3014143e15a4abb276fc813c5adadc2998948896 Mon Sep 17 00:00:00 2001 From: hwdsl2 Date: Tue, 11 May 2021 09:59:29 -0500 Subject: [PATCH] Update IKEv2 script - Advanced users can specify the server's IP address using variable VPN_PUBLIC_IP instead of auto-detect --- extras/ikev2setup.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/extras/ikev2setup.sh b/extras/ikev2setup.sh index 8e2c693..74bc7a4 100755 --- a/extras/ikev2setup.sh +++ b/extras/ikev2setup.sh @@ -345,7 +345,8 @@ get_export_dir() { get_server_ip() { bigecho2 "Trying to auto discover IP of this server..." - public_ip=$(dig @resolver1.opendns.com -t A -4 myip.opendns.com +short) + public_ip=${VPN_PUBLIC_IP:-''} + check_ip "$public_ip" || public_ip=$(dig @resolver1.opendns.com -t A -4 myip.opendns.com +short) check_ip "$public_ip" || public_ip=$(wget -t 3 -T 15 -qO- http://ipv4.icanhazip.com) }