1
0
Fork 0
mirror of https://github.com/NeoCloud/NeoNetwork synced 2024-11-22 14:40:41 +08:00

updated WireGuard config template

This commit is contained in:
Neo_Chen 2023-05-02 23:44:44 +08:00
parent 2ffb288abb
commit a386fbf0c0
2 changed files with 1 additions and 4 deletions

View file

@ -6,10 +6,8 @@ PEER_IP="$3"
LOCAL_IPV6="$4"
PEER_IPV6="$5"
ip addr del "$LOCAL_IP" dev "$IF"
ip addr add "$LOCAL_IP" peer "$PEER_IP" dev "$IF"
if [ "$#" -ge 5 ]; then
ip addr del "$LOCAL_IPV6" dev "$IF"
ip addr add "$LOCAL_IPV6" peer "$PEER_IPV6" dev "$IF"
fi

View file

@ -1,6 +1,5 @@
[Interface]
Address = <Local IPv4>, <Local IPv6>
PostUp = /path/to/wg-postup.sh <Interface Name> <Local IPv4> <Peer IPv4> <Local IPv6> <Peer IPv6>
PostUp = /path/to/wg-postup.sh %i <Local IPv4> <Peer IPv4> <Local IPv6> <Peer IPv6>
# Set MTU to 1412 if using PPP
#MTU = 1412
Table = off