Skip to content

Instantly share code, notes, and snippets.

@ratnose
Created September 25, 2020 05:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ratnose/9e6eb2db052e0cb9a1d9a1a655fdb249 to your computer and use it in GitHub Desktop.
Save ratnose/9e6eb2db052e0cb9a1d9a1a655fdb249 to your computer and use it in GitHub Desktop.
Client:
[Interface]
PrivateKey = ******
ListenPort = 51845
Address = 10.125.37.20/24
DNS = 46.227.67.134, 192.165.9.158
[Peer]
PublicKey = ******
AllowedIPs = 0.0.0.0/0
Endpoint = vpn.domain.io:51845
Server:
[Interface]
Address = 10.125.37.1/24
PostUp = iptables -A FORWARD -i %i -j ACCEPT; iptables -A FORWARD -o %i -j ACCEPT; iptables -t nat -A POSTROUTING -o ens18 -j MASQUERADE
PostDown = iptables -D FORWARD -i %i -j ACCEPT; iptables -D FORWARD -o %i -j ACCEPT; iptables -t nat -D POSTROUTING -o ens18 -j MASQUERADE
ListenPort = 51845
PrivateKey = ******
[Peer]
PublicKey = *****
AllowedIPs = 10.125.37.20/32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment