Last active
February 18, 2024 02:07
Star
You must be signed in to star a gist
Sample WireGuard configuration files
This file contains 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.200.200.3/32 | |
PrivateKey = [Client's private key] | |
DNS = 8.8.8.8 | |
[Peer] | |
PublicKey = [Server's public key] | |
PresharedKey = [Pre-shared key, same for server and client] | |
Endpoint = [Server Addr:Server Port] | |
AllowedIPs = 0.0.0.0/0 | |
PersistentKeepalive = 21 |
This file contains 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.200.200.1/24 | |
#SaveConfig = true | |
PostUp = iptables -I FORWARD 1 -i wg0 -j ACCEPT; iptables -I FORWARD 1 -o wg0 -j ACCEPT; iptables -t nat -I POSTROUTING 1 -s 10.200.200.0/24 -o eth0 -j MASQUERADE | |
PostDown = iptables -D FORWARD -i wg0 -j ACCEPT; iptables -D FORWARD -o wg0 -j ACCEPT; iptables -t nat -D POSTROUTING -s 10.200.200.0/24 -o eth0 -j MASQUERADE | |
ListenPort = 10086 | |
PrivateKey = [Server's private key] | |
[Peer] | |
# Client 1 | |
PublicKey = [Client's public key] | |
AllowedIPs = 10.200.200.2/32 | |
PresharedKey = [Pre-shared key, same for server and client] | |
[Peer] | |
# Client 2 | |
PublicKey = [Client's public key] | |
AllowedIPs = 10.200.200.2/32 | |
PresharedKey = [Pre-shared key, same for server and client] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment