diff --git a/auto_install/install.sh b/auto_install/install.sh index ed54931..2649b18 100755 --- a/auto_install/install.sh +++ b/auto_install/install.sh @@ -1094,6 +1094,9 @@ installPiVPN(){ pivpnDEV="wg0" pivpnNET="10.6.0.0" vpnGw="${pivpnNET/.0.0/.0.1}" + # Forward all traffic through PiVPN (i.e. full-tunnel), may be modified by + # the user after the installation. + ALLOWED_IPS="0.0.0.0/0, ::0/0" CUSTOMIZE=0 installWireGuard @@ -1110,6 +1113,7 @@ installPiVPN(){ echo "pivpnDEV=${pivpnDEV}" >> ${tempsetupVarsFile} echo "pivpnNET=${pivpnNET}" >> ${tempsetupVarsFile} echo "subnetClass=${subnetClass}" >> ${tempsetupVarsFile} + echo "ALLOWED_IPS=\"${ALLOWED_IPS}\"" >> ${tempsetupVarsFile} } askWhichVPN(){ diff --git a/scripts/wireguard/makeCONF.sh b/scripts/wireguard/makeCONF.sh index 0564fb5..73bfd9b 100755 --- a/scripts/wireguard/makeCONF.sh +++ b/scripts/wireguard/makeCONF.sh @@ -110,7 +110,7 @@ echo "[Peer] PublicKey = $(cat keys/server_pub) PresharedKey = $(cat "keys/${CLIENT_NAME}_psk") Endpoint = ${pivpnHOST}:${pivpnPORT} -AllowedIPs = 0.0.0.0/0, ::0/0" >> "configs/${CLIENT_NAME}.conf" +AllowedIPs = ${ALLOWED_IPS}" >> "configs/${CLIENT_NAME}.conf" echo "::: Client config generated" echo "### begin ${CLIENT_NAME} ###