bedefaced / vpn-install

Simple PPTP, L2TP/IPsec, OpenVPN installers
GNU General Public License v3.0
244 stars 102 forks source link

external IP detection fix #9

Open Ph0enix777 opened 4 years ago

Ph0enix777 commented 4 years ago

LOCALIPMASK="$LOCALIP$LOCALMASK"

IP=$(ip addr | grep 'inet' | grep -v inet6 | grep -vE '127.[0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3}' | grep -o -E '[0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3}' | head -1)