trickster-vpn/include_mode_cfg_gen/wg-internal.conf
2022-11-17 00:17:07 +03:00

22 lines
989 B
Plaintext

[Interface]
Address = 10.20.30.1/32
ListenPort = 17968
PrivateKey = ---PRIVATE_KEY_INTERNAL---
PostUp = iptables -t nat -A POSTROUTING -o `ip route | awk '/default/ {print $5; exit}'` -j MASQUERADE
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
PostUp = ip route delete default dev wg-internal table 51820
PostUp = bash /etc/wireguard/update_include_routes.sh
PostDown = iptables -t nat -D POSTROUTING -o `ip route | awk '/default/ {print $5; exit}'` -j MASQUERADE
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
#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