forked from murilopereirame/surfwire
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwg0.conf
23 lines (19 loc) · 788 Bytes
/
wg0.conf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# Server .conf
[Interface]
Address = <INTERNAL_VPN_ADDRESS>
ListenPort = 51820
PrivateKey = <INTERNAL_VPN_PRIVATE_KEY>
FwMark = 51820
PostUp = iptables -A FORWARD -i %i -j ACCEPT
PostUp = iptables -A FORWARD -o %i -j ACCEPT
PostUp = iptables -A FORWARD -o eth+ ! -d <GATEWAY_IP>/24 -j REJECT
PostUp = iptables -t nat -A POSTROUTING -o external -j MASQUERADE
PostUp = iptables -t nat -A POSTROUTING -o eth+ -j MASQUERADE
PostDown = iptables -D FORWARD -i %i -j ACCEPT
PostDown = iptables -D FORWARD -o %i -j ACCEPT
PostDown = iptables -D FORWARD -o eth+ ! -d <GATEWAY_IP>/24 -j REJECT
PostDown = iptables -t nat -D POSTROUTING -o external -j MASQUERADE
PostDown = iptables -t nat -D POSTROUTING -o eth+ -j MASQUERADE
[Peer]
PublicKey = <CLIENT_PUBLIC_KEY>
AllowedIPs = 0.0.0.0/0