Update IKEv2 script
- Advanced users can specify the server's IP address using variable VPN_PUBLIC_IP instead of auto-detect
This commit is contained in:
parent
293e5d999a
commit
3014143e15
@ -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)
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user