Skip to content

Instantly share code, notes, and snippets.

@reduxionist
Forked from flotwig/internet-wg0.conf
Last active December 23, 2020 16:56
Show Gist options
  • Save reduxionist/6fc7a79d6e27bfd5f4e801983f917735 to your computer and use it in GitHub Desktop.
Save reduxionist/6fc7a79d6e27bfd5f4e801983f917735 to your computer and use it in GitHub Desktop.
WireGuard configuration
[Interface]
# Configuration for the server
# Set the IP subnet that will be used for the WireGuard network.
# 10.222.0.1 - 10.222.0.255 is a memorable preset that is unlikely to conflict.
Address = 10.222.0.1/24
# The port that will be used to listen to connections. 51820 is the default.
ListenPort = 51820
# The output of `wg genkey` for the server.
PrivateKey = server-private-key-here
[Peer]
# Configuration for the server's client
# The output of `echo "client private key" > wg pubkey`.
PublicKey = client-public-key-here
# The IP address that this client is allowed to use.
AllowedIPs = 10.222.0.2/32
# Ensures that your home router does not kill the tunnel, by sending a ping
# every 25 seconds.
PersistentKeepalive = 25
[Interface]
# Configuration for the client
# The IP address that this client will have on the WireGuard network.
Address = 10.222.0.2/32
# The private key you generated for the client previously.
PrivateKey = your-client-private-key
[Peer]
# Configuration for the server to connect to
# The public key you generated for the server previously.
PublicKey = your-server-public-key
# The WireGuard server to connect to.
Endpoint = your-server-domain-name-or-IP-address:51820
# The subnet this WireGuard VPN is in control of.
AllowedIPs = 10.222.0.0/24
# Ensures that your home router does not kill the tunnel, by sending a ping
# every 25 seconds.
PersistentKeepalive = 25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment