Skip to content

Instantly share code, notes, and snippets.

@tetranz
Last active November 14, 2020 13:01
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 tetranz/0245161090b6d351aa8ed1a53e59b7ae to your computer and use it in GitHub Desktop.
Save tetranz/0245161090b6d351aa8ed1a53e59b7ae to your computer and use it in GitHub Desktop.
wireguard-up.sh
iptables -A FORWARD -p tcp --tcp-flags SYN,RST SYN -j TCPMSS --clamp-mss-to-pmtu
iptables -A FORWARD -i eth0 -o wg0 -j ACCEPT
iptables -A FORWARD -i wg0 -o eth0 -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT
iptables -t nat -A POSTROUTING -o wg0 -j MASQUERADE
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment