Last active
June 30, 2021 19:35
-
-
Save iamramahibrah/06a998c357e66138d0fc20bbad77e1a6 to your computer and use it in GitHub Desktop.
Wireguard Config File
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 = 192.168.168.1/24 # IPV4 CIDR | |
PostUp = iptables -A FORWARD -i wg0 -j ACCEPT; iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE | |
PostDown = iptables -D FORWARD -i wg0 -j ACCEPT; iptables -t nat -D POSTROUTING -o eth0 -j MASQUERADE | |
PrivateKey = sGEPcI+wbFvwq8YwiHluREFbGXa9QzRsfrA8pyLb81A= | |
ListenPort = 51820 | |
[Peer] | |
PublicKey = B1Oyq4HertWCcK8YBWETfoHICnFN4+tCfyouxsdhWhs= # Client public key | |
AllowedIPs = 10.10.0.2/32, fd86:ea04:1111::2/128 # IPs client can connect as | |
PersistentKeepalive=25 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
How to Generate public and private Keys
umask 077; wg genkey | tee privatekey | wg pubkey >publickey