Skip to content

Instantly share code, notes, and snippets.

@boweiliu
Last active April 6, 2020 01:14
Show Gist options
  • Save boweiliu/266c3210ffac44ae36533400fb61fc2c to your computer and use it in GitHub Desktop.
Save boweiliu/266c3210ffac44ae36533400fb61fc2c to your computer and use it in GitHub Desktop.
wireguard conf
### sources :
### https://jonathanhamberg.com/post/2018-10-17-wireguard-behind-nat/
### https://github.com/pirate/wireguard-docs#NAT-to-NAT-Connections
### https://github.com/pirate/wireguard-docs#Config-Creation
### https://github.com/pirate/wireguard-docs
### https://try.popho.be/wg.html
### https://wiki.archlinux.org/index.php/WireGuard#Persistent_configuration
### https://www.wireguard.com/quickstart/
## wg0.conf on laptop
[Interface]
# laptop
Address = 10.5.17.2/24
PrivateKey = KEY=
SaveConfig = false
[Peer]
# server
PublicKey = KEY=
AllowedIPs = 10.5.17.1/32
Endpoint = ec2-instance-address:37751
PersistentKeepalive = 5
## wg0.conf on server
[Interface]
# server
Address = 10.5.17.1/24
ListenPort = 37751
PrivateKey = KEY=
SaveConfig = false
[Peer]
# laptop
PublicKey = KEY=
AllowedIPs = 10.5.17.2/32
PersistentKeepalive = 5
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment