mirror of
https://github.com/pivpn/pivpn.git
synced 2024-12-18 19:00:15 +00:00
Expose AllowedIPs settings inside setupVars.conf
This commit is contained in:
parent
443ef51e29
commit
3ed54bf71d
2 changed files with 5 additions and 1 deletions
|
@ -1094,6 +1094,9 @@ installPiVPN(){
|
||||||
pivpnDEV="wg0"
|
pivpnDEV="wg0"
|
||||||
pivpnNET="10.6.0.0"
|
pivpnNET="10.6.0.0"
|
||||||
vpnGw="${pivpnNET/.0.0/.0.1}"
|
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
|
CUSTOMIZE=0
|
||||||
|
|
||||||
installWireGuard
|
installWireGuard
|
||||||
|
@ -1110,6 +1113,7 @@ installPiVPN(){
|
||||||
echo "pivpnDEV=${pivpnDEV}" >> ${tempsetupVarsFile}
|
echo "pivpnDEV=${pivpnDEV}" >> ${tempsetupVarsFile}
|
||||||
echo "pivpnNET=${pivpnNET}" >> ${tempsetupVarsFile}
|
echo "pivpnNET=${pivpnNET}" >> ${tempsetupVarsFile}
|
||||||
echo "subnetClass=${subnetClass}" >> ${tempsetupVarsFile}
|
echo "subnetClass=${subnetClass}" >> ${tempsetupVarsFile}
|
||||||
|
echo "ALLOWED_IPS=\"${ALLOWED_IPS}\"" >> ${tempsetupVarsFile}
|
||||||
}
|
}
|
||||||
|
|
||||||
askWhichVPN(){
|
askWhichVPN(){
|
||||||
|
|
|
@ -110,7 +110,7 @@ echo "[Peer]
|
||||||
PublicKey = $(cat keys/server_pub)
|
PublicKey = $(cat keys/server_pub)
|
||||||
PresharedKey = $(cat "keys/${CLIENT_NAME}_psk")
|
PresharedKey = $(cat "keys/${CLIENT_NAME}_psk")
|
||||||
Endpoint = ${pivpnHOST}:${pivpnPORT}
|
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 "::: Client config generated"
|
||||||
|
|
||||||
echo "### begin ${CLIENT_NAME} ###
|
echo "### begin ${CLIENT_NAME} ###
|
||||||
|
|
Loading…
Reference in a new issue