mirror of
https://github.com/pirate/wireguard-docs.git
synced 2025-04-19 08:55:09 +00:00
27 lines
962 B
Plaintext
27 lines
962 B
Plaintext
[Interface]
|
|
# Name = vancouver.example-vpn.tld
|
|
# LAN = 192.168.3.1/24
|
|
Address = 10.0.44.3/24
|
|
ListenPort = 51820
|
|
PrivateKey = WN+bvd3PCWs5Pk3bvl7abWR0c1L6PCWKYRX56mjVYGo=
|
|
DNS = 1.1.1.1
|
|
PostUp = sysctl -w net.ipv4.ip_forward=1
|
|
PostUp = sysctl -w net.ipv6.conf.all.forwarding=1
|
|
PostUp = iptables -A FORWARD -i %i -j ACCEPT; iptables -A FORWARD -o %i -j ACCEPT; iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
|
|
PostDown = iptables -D FORWARD -i %i -j ACCEPT; iptables -D FORWARD -o %i -j ACCEPT; iptables -t nat -D POSTROUTING -o eth0 -j MASQUERADE
|
|
|
|
|
|
[Peer]
|
|
# Name = montreal.example-vpn.dev
|
|
# LAN = 192.168.1.1/24
|
|
Endpoint = montreal.example-vpn.dev:51820
|
|
PublicKey = q/+jwmL5tNuYSB3z+t9Caj00Pc1YQ8zf+uNPu/UE1wE=
|
|
AllowedIPs = 10.0.44.1/32, 192.168.1.1/24
|
|
|
|
[Peer]
|
|
# Name = newyork.example-vpn.dev
|
|
# LAN = 192.168.2.1/24
|
|
Endpoint = newyork.example-vpn.dev:51820
|
|
PublicKey = SceMEaVZaZfOGtGXjMsoJjhwxKHkb++9wjxqN1vm32s=
|
|
AllowedIPs = 10.0.44.2/32, 192.168.2.1/24
|