support ALLOWED_IPS from setupVARs.conf

This commit is contained in:
DerDanilo 2021-03-15 18:33:47 +01:00
parent d3e009d171
commit a3d652755c
2 changed files with 7 additions and 3 deletions

View file

@ -1093,9 +1093,12 @@ installPiVPN(){
pivpnNET="10.6.0.0" pivpnNET="10.6.0.0"
fi fi
vpnGw="${pivpnNET/.0.0/.0.1}" vpnGw="${pivpnNET/.0.0/.0.1}"
# Allow custom allowed IPs via unattend setupVARs file. Use default if not provided.
if [ -z "$ALLOWED_IPS" ]; then
# Forward all traffic through PiVPN (i.e. full-tunnel), may be modified by # Forward all traffic through PiVPN (i.e. full-tunnel), may be modified by
# the user after the installation. # the user after the installation.
ALLOWED_IPS="0.0.0.0/0, ::0/0" ALLOWED_IPS="0.0.0.0/0, ::0/0"
fi
CUSTOMIZE=0 CUSTOMIZE=0
installWireGuard installWireGuard

View file

@ -3,6 +3,7 @@ install_user=pi
VPN=wireguard VPN=wireguard
pivpnNET=10.6.0.0 pivpnNET=10.6.0.0
subnetClass=24 subnetClass=24
ALLOWED_IPS="0.0.0.0/0, ::0/0"
pivpnPORT=51820 pivpnPORT=51820
pivpnDNS1=9.9.9.9 pivpnDNS1=9.9.9.9
pivpnDNS2=149.112.112.112 pivpnDNS2=149.112.112.112