Created
June 23, 2018 16:59
-
-
Save vkobel/b4f003ac72410b7cc7788fcdf8046641 to your computer and use it in GitHub Desktop.
Wireguard config example (VPN home)
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] | |
Address = 10.0.0.2/24 | |
PrivateKey = <Client 1 Priv Key> | |
[Peer] | |
PublicKey = <Server Pub Key> | |
Endpoint = <Server Public IP>:51820 | |
AllowedIPs = 0.0.0.0/0 | |
PersistentKeepalive = 25 |
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] | |
Address = 10.0.0.3/24 | |
PrivateKey = <Client 2 Priv Key> | |
[Peer] | |
PublicKey = <Server Pub Key> | |
Endpoint = <Server Public IP>:51820 | |
AllowedIPs = 0.0.0.0/0 | |
PersistentKeepalive = 25 |
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] | |
Address = 10.0.0.1/24 | |
PostUp = iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE; iptables -A FORWARD -i wg0 -j ACCEPT | |
PostDown = iptables -t nat -D POSTROUTING -o eth0 -j MASQUERADE; iptables -D FORWARD -i wg0 -j ACCEPT | |
ListenPort = 51820 | |
PrivateKey = <Server Priv Key> | |
[Peer] | |
PublicKey = <Client 1 Pub Key> | |
AllowedIPs = 10.0.0.0/24 | |
[Peer] | |
PublicKey = <Client 2 Pub Key> | |
AllowedIPs = 10.0.0.0/24 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment