Created
April 10, 2026 16:29
-
-
Save pashinin/6767172fcff9926f51681709b4d642c5 to your computer and use it in GitHub Desktop.
wireguard config
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 = ****SERVER PRIV KEY**** | |
| Address = 10.10.0.1/24 | |
| ListenPort = 12345 | |
| # substitute eth0 in the following lines to match the Internet-facing interface | |
| # if the server is behind a router and receives traffic via NAT, these iptables rules are not needed | |
| PostUp = iptables -A FORWARD -i %i -j ACCEPT; iptables -A FORWARD -o %i -j ACCEPT; iptables -t nat -A POSTROUTING -o enp3s0 -j MASQUERADE | |
| PostDown = iptables -D FORWARD -i %i -j ACCEPT; iptables -D FORWARD -o %i -j ACCEPT; iptables -t nat -D POSTROUTING -o enp3s0 -j MASQUERADE | |
| #PostUp = iptables -A FORWARD -i %i -j ACCEPT; iptables -A FORWARD -o %i -j ACCEPT; iptables -t nat -A POSTROUTING -s 10.10.0.0/24 -o eth0 -j MASQUERADE | |
| #PostDown = iptables -D FORWARD -i %i -j ACCEPT; iptables -D FORWARD -o %i -j ACCEPT; iptables -t nat -D POSTROUTING -s 10.10.0.0/24 -o eth0 -j MASQUERADE | |
| #[Peer] | |
| #PublicKey = ****CLIENT PUBLIC KEY**** | |
| #AllowedIPs = 10.10.0.2/32 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment