mirror of
https://github.com/NeoCloud/NeoNetwork
synced 2024-11-22 21:20:41 +08:00
updated WireGuard config template
This commit is contained in:
parent
2ffb288abb
commit
a386fbf0c0
2 changed files with 1 additions and 4 deletions
|
@ -6,10 +6,8 @@ PEER_IP="$3"
|
||||||
LOCAL_IPV6="$4"
|
LOCAL_IPV6="$4"
|
||||||
PEER_IPV6="$5"
|
PEER_IPV6="$5"
|
||||||
|
|
||||||
ip addr del "$LOCAL_IP" dev "$IF"
|
|
||||||
ip addr add "$LOCAL_IP" peer "$PEER_IP" dev "$IF"
|
ip addr add "$LOCAL_IP" peer "$PEER_IP" dev "$IF"
|
||||||
|
|
||||||
if [ "$#" -ge 5 ]; then
|
if [ "$#" -ge 5 ]; then
|
||||||
ip addr del "$LOCAL_IPV6" dev "$IF"
|
|
||||||
ip addr add "$LOCAL_IPV6" peer "$PEER_IPV6" dev "$IF"
|
ip addr add "$LOCAL_IPV6" peer "$PEER_IPV6" dev "$IF"
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
[Interface]
|
[Interface]
|
||||||
Address = <Local IPv4>, <Local IPv6>
|
PostUp = /path/to/wg-postup.sh %i <Local IPv4> <Peer IPv4> <Local IPv6> <Peer IPv6>
|
||||||
PostUp = /path/to/wg-postup.sh <Interface Name> <Local IPv4> <Peer IPv4> <Local IPv6> <Peer IPv6>
|
|
||||||
# Set MTU to 1412 if using PPP
|
# Set MTU to 1412 if using PPP
|
||||||
#MTU = 1412
|
#MTU = 1412
|
||||||
Table = off
|
Table = off
|
||||||
|
|
Loading…
Reference in a new issue