2022-08-22 04:30:06 +03:00
|
|
|
[Interface]
|
|
|
|
Address = 10.20.30.1/32
|
|
|
|
ListenPort = 17968
|
|
|
|
PrivateKey = ---PRIVATE_KEY_INTERNAL---
|
2022-08-23 23:12:01 +03:00
|
|
|
PostUp = iptables -t nat -A POSTROUTING -o `ip route | awk '/default/ {print $5; exit}'` -j MASQUERADE
|
2022-08-29 18:31:52 +03:00
|
|
|
PostUp = ip rule add from `ip addr show $(ip route | awk '/default/ { print $5 }') | grep "inet" | grep -v "inet6" | head -n 1 | awk '/inet/ {print $2}' | awk -F/ '{print $1}'` table main
|
2022-08-23 23:12:01 +03:00
|
|
|
PostDown = iptables -t nat -D POSTROUTING -o `ip route | awk '/default/ {print $5; exit}'` -j MASQUERADE
|
2022-08-29 18:31:52 +03:00
|
|
|
PostDown = ip rule del from `ip addr show $(ip route | awk '/default/ { print $5 }') | grep "inet" | grep -v "inet6" | head -n 1 | awk '/inet/ {print $2}' | awk -F/ '{print $1}'` table main
|
2022-08-22 04:30:06 +03:00
|
|
|
|
|
|
|
#external node
|
|
|
|
[Peer]
|
|
|
|
PublicKey = ---PUBLIC_KEY_EXTERNAL---
|
|
|
|
AllowedIPs = 10.20.30.2/32, 0.0.0.0/0
|
|
|
|
|
|
|
|
#mobile-client node
|
|
|
|
[Peer]
|
|
|
|
PublicKey = ---PUBLIC_KEY_CLIENT_1---
|
|
|
|
AllowedIPs = 10.20.30.3/32
|