Skip to content

Instantly share code, notes, and snippets.

@jheiselman
Created January 20, 2020 01:19
Show Gist options
  • Select an option

  • Save jheiselman/737b4415c41ff5ec30215b44fd392c8e to your computer and use it in GitHub Desktop.

Select an option

Save jheiselman/737b4415c41ff5ec30215b44fd392c8e to your computer and use it in GitHub Desktop.
Wireguard Config
[Interface]
Address = 192.168.2.1/24
Table = 51820
PostUp = iptables -A FORWARD -i %i -j ACCEPT; iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE; ip6tables -A FORWARD -i %i -j ACCEPT; ip6tables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
PostDown = iptables -D FORWARD -i %i -j ACCEPT; iptables -t nat -D POSTROUTING -o eth0 -j MASQUERADE; ip6tables -D FORWARD -i %i -j ACCEPT; ip6tables -t nat -D POSTROUTING -o eth0 -j MASQUERADE
ListenPort = 51820
PrivateKey = <PrivateKey>
# Jerry
[Peer]
PublicKey = <PubKey>
AllowedIPs = 192.168.2.2/32
PersistentKeepalive = 25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment