Last active
July 22, 2020 15:19
-
-
Save arifnd/5a026a157becedb4c86b55699c29ca95 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] | |
| Address = 10.10.10.1/24 | |
| PrivateKey = | |
| ListenPort = 10101 | |
| #PostUp = iptables -A FORWARD -i wg0 -j ACCEPT; iptables -t nat -A POSTROUTING -o venet0 -j MASQUERADE; | |
| #PostDown = iptables -D FORWARD -i wg0 -j ACCEPT; iptables -t nat -D POSTROUTING -o venet0 -j MASQUERADE; | |
| PostUp = iptables -A FORWARD -i %i -j ACCEPT; iptables -A FORWARD -o %i -j ACCEPT; iptables -t nat -A POSTROUTING -o vnet0 -j MASQUERADE | |
| PostDown = iptables -D FORWARD -i %i -j ACCEPT; iptables -D FORWARD -o %i -j ACCEPT; iptables -t nat -D POSTROUTING -o vnet0 -j MASQUERADE | |
| [Peer] | |
| PublicKey = | |
| AllowedIPs = 10.10.10.2/32 | |
| [Peer] | |
| PublicKey = | |
| AllowedIPs = 10.10.10.6/32 |
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
| wg genkey | tee privatekey | wg pubkey > publickey |
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.10.10.2/24 | |
| PrivateKey = | |
| #DNS = 10.10.10.1 | |
| [Peer] | |
| PublicKey = | |
| Endpoint = <server-ip>:10101 | |
| AllowedIPs = 10.10.10.0/24 | |
| PersistentKeepalive = 25 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment