Last active
February 21, 2022 06:22
-
-
Save apsun/1617bf780781aa43bfe9e0eea13947e9 to your computer and use it in GitHub Desktop.
Example WireGuard configuration
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Interface] | |
PrivateKey = <REDACTED> | |
Address = 10.19.84.2/32,fd07:d3fc:8a02::2/128 | |
DNS = 10.19.84.1,fd07:d3fc:8a02::1 | |
MTU = 1280 | |
[Peer] | |
PublicKey = <REDACTED> | |
PresharedKey = <REDACTED> | |
AllowedIPs = 0.0.0.0/0,::/0 | |
Endpoint = <SERVER HOSTNAME>:1337 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Interface] | |
PrivateKey = <REDACTED> | |
ListenPort = 1337 | |
Address = 10.19.84.1/24,fd07:d3fc:8a02::1/48 | |
MTU = 1280 | |
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 | |
PostUp = ip6tables -A FORWARD -i %i -j ACCEPT | |
PostUp = ip6tables -A FORWARD -o %i -j ACCEPT | |
PostUp = ip6tables -t nat -A POSTROUTING -o eth0 -j MASQUERADE | |
PreDown = iptables -D FORWARD -i %i -j ACCEPT | |
PreDown = iptables -D FORWARD -o %i -j ACCEPT | |
PreDown = iptables -t nat -D POSTROUTING -o eth0 -j MASQUERADE | |
PreDown = ip6tables -D FORWARD -i %i -j ACCEPT | |
PreDown = ip6tables -D FORWARD -o %i -j ACCEPT | |
PreDown = ip6tables -t nat -D POSTROUTING -o eth0 -j MASQUERADE | |
[Peer] | |
PublicKey = <REDACTED> | |
PresharedKey = <REDACTED> | |
AllowedIPs = 10.19.84.2/32,fd07:d3fc:8a02::2/128 | |
[Peer] | |
PublicKey = <REDACTED> | |
PresharedKey = <REDACTED> | |
AllowedIPs = 10.19.84.3/32,fd07:d3fc:8a02::3/128 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment