Skip to content

Instantly share code, notes, and snippets.

@olegantonyan
Created December 14, 2019 08:59
Show Gist options
  • Save olegantonyan/cf5b0fb54e927003568608c268a07749 to your computer and use it in GitHub Desktop.
Save olegantonyan/cf5b0fb54e927003568608c268a07749 to your computer and use it in GitHub Desktop.
[Interface]
Address = <...>
MTU = 1412
PrivateKey = <...>
DNS = <...>
PostUp = iptables -t nat -A POSTROUTING -o %i -j MASQUERADE; iptables -A FORWARD -i %i -m state --state RELATED,ESTABLISHED -j ACCEPT; iptables -A FORWARD -p tcp --tcp-flags SYN,RST SYN -j TCPMSS --clamp-mss-to-pmtu
PostDown = iptables -t nat -D POSTROUTING -o %i -j MASQUERADE; iptables -D FORWARD -i %i -m state --state RELATED,ESTABLISHED -j ACCEPT; iptables -D FORWARD -p tcp --tcp-flags SYN,RST SYN -j TCPMSS --clamp-mss-to-pmtu
[Peer]
PublicKey = <...>
AllowedIPs = 0.0.0.0/0
Endpoint = <...>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment