summaryrefslogtreecommitdiff
path: root/roles/wgvpn/templates/wgvpn0.conf.j2
blob: bb95632c6f76ab574b7db16f674a58721e27767a (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
[Interface]
PrivateKey = {{ wireguard_private_key }}
Address = 10.0.1.1/24
ListenPort = 51821

PostUp = iptables -A FORWARD -i %i -j ACCEPT
PostUp = iptables -A FORWARD -o %i -j ACCEPT
PostUp = iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE

PostDown = iptables -D FORWARD -i %i -j ACCEPT
PostDown = iptables -D FORWARD -o %i -j ACCEPT
PostDown = iptables -t nat -D POSTROUTING -o eth0 -j MASQUERADE

# earth
[Peer]
PublicKey = HhBhDQmGzltIGQOn+clbRIkQt7ocPAuqsUS+ytinIwU=
AllowedIPs = 10.0.1.2/32