Update IKEv2 script
- Make IKEv2 client address pool customizable using VPN_XAUTH_POOL, similar to vpnsetup.sh. This is for advanced users only.
This commit is contained in:
parent
79a344ec46
commit
32a55ec06a
@ -1032,6 +1032,7 @@ ANSWERS
|
|||||||
|
|
||||||
add_ikev2_connection() {
|
add_ikev2_connection() {
|
||||||
bigecho2 "Adding a new IKEv2 connection..."
|
bigecho2 "Adding a new IKEv2 connection..."
|
||||||
|
XAUTH_POOL=${VPN_XAUTH_POOL:-'192.168.43.10-192.168.43.250'}
|
||||||
if ! grep -qs '^include /etc/ipsec\.d/\*\.conf$' "$IPSEC_CONF"; then
|
if ! grep -qs '^include /etc/ipsec\.d/\*\.conf$' "$IPSEC_CONF"; then
|
||||||
echo >> "$IPSEC_CONF"
|
echo >> "$IPSEC_CONF"
|
||||||
echo 'include /etc/ipsec.d/*.conf' >> "$IPSEC_CONF"
|
echo 'include /etc/ipsec.d/*.conf' >> "$IPSEC_CONF"
|
||||||
@ -1046,7 +1047,7 @@ conn ikev2-cp
|
|||||||
leftrsasigkey=%cert
|
leftrsasigkey=%cert
|
||||||
right=%any
|
right=%any
|
||||||
rightid=%fromcert
|
rightid=%fromcert
|
||||||
rightaddresspool=192.168.43.10-192.168.43.250
|
rightaddresspool=$XAUTH_POOL
|
||||||
rightca=%same
|
rightca=%same
|
||||||
rightrsasigkey=%cert
|
rightrsasigkey=%cert
|
||||||
narrowing=yes
|
narrowing=yes
|
||||||
|
Loading…
Reference in New Issue
Block a user