Created
January 30, 2025 07:54
-
-
Save jason9075/0f82e149f02a6636065b8ca010fb8644 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
# sudo vim /etc/wireguard/wg0.conf | |
# replace <key> and <eth0> | |
# sudo wg show | |
[Interface] | |
PrivateKey = <key> | |
Address = 10.22.0.0/24 | |
ListenPort = 51820 | |
PostUp = iptables -A FORWARD -i %i -j ACCEPT; iptables -A FORWARD -o %i -j ACCEPT; iptables -t nat -A POSTROUTING -o <eth0> -j MASQUERADE | |
PostDown = iptables -D FORWARD -i %i -j ACCEPT; iptables -D FORWARD -o %i -j ACCEPT; iptables -t nat -D POSTROUTING -o <eth0> -j MASQUERADE | |
[Peer] | |
# Jason Kuan's Macbook Pro | |
PublicKey = <key> | |
AllowedIPs = 10.22.0.100/32 | |
[Peer] | |
# Jason Kuan's Pixel 7 | |
PublicKey = <key> | |
AllowedIPs = 10.22.0.101/32 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment