Created
December 24, 2023 13:28
-
-
Save meehatpa/1b368acc82a3f80a8cb3ccd11b504342 to your computer and use it in GitHub Desktop.
site2site nat wg client
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.x/32 | |
PrivateKey = xxx | |
ListenPort = 51820 | |
DNS = xx | |
PreUp = sysctl -w net.ipv4.ip_forward=1 | |
PostUp = iptables -A FORWARD -i %i -j ACCEPT; iptables -A FORWARD -o %i -j ACCEPT; iptables -t nat -A POSTROUTING -o eth+ -j MASQUERADE | |
PostDown = iptables -D FORWARD -i %i -j ACCEPT; iptables -D FORWARD -o %i -j ACCEPT; iptables -t nat -D POSTROUTING -o eth+ -j MASQUERADE | |
[Peer] | |
PublicKey = xxx | |
PresharedKey = xxx | |
Endpoint = ip:51820 | |
AllowedIPs = 10.0.0.0/24 | |
PersistentKeepalive = 25 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment