mirror of
https://github.com/angristan/openvpn-install.git
synced 2024-11-22 00:39:03 +01:00
Clarifies that it supports Scaleway NATed servers
This commit is contained in:
parent
f815715c45
commit
2c7d211b04
@ -54,7 +54,7 @@ newclient () {
|
||||
|
||||
|
||||
# Try to get our IP from the system and fallback to the Internet.
|
||||
# I do this to make the script compatible with NATed servers (lowendspirit.com)
|
||||
# I do this to make the script compatible with NATed servers (LowEndSpirit/Scaleway)
|
||||
# and to avoid getting an IPv6.
|
||||
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)
|
||||
if [[ "$IP" = "" ]]; then
|
||||
@ -335,13 +335,13 @@ crl-verify crl.pem" >> /etc/openvpn/server.conf
|
||||
chkconfig openvpn on
|
||||
fi
|
||||
fi
|
||||
# Try to detect a NATed connection and ask about it to potential LowEndSpirit users
|
||||
# Try to detect a NATed connection and ask about it to potential LowEndSpirit/Scaleway users
|
||||
EXTERNALIP=$(wget -qO- ipv4.icanhazip.com)
|
||||
if [[ "$IP" != "$EXTERNALIP" ]]; then
|
||||
echo ""
|
||||
echo "Looks like your server is behind a NAT!"
|
||||
echo ""
|
||||
echo "If your server is NATed (LowEndSpirit), I need to know the external IP"
|
||||
echo "If your server is NATed (e.g. LowEndSpirit, Scaleway), I need to know the external IP"
|
||||
echo "If that's not the case, just ignore this and leave the next field blank"
|
||||
read -p "External IP: " -e USEREXTERNALIP
|
||||
if [[ "$USEREXTERNALIP" != "" ]]; then
|
||||
|
Loading…
Reference in New Issue
Block a user