Skip to content

Instantly share code, notes, and snippets.

@westphahl
Created February 22, 2020 17:53
Show Gist options
  • Save westphahl/dd8b0b74d2a3611b3bd753bee99059e0 to your computer and use it in GitHub Desktop.
Save westphahl/dd8b0b74d2a3611b3bd753bee99059e0 to your computer and use it in GitHub Desktop.
Wireguard systemd config
# /etc/systemd/network/98-wireguard.network
[Match]
Name = wg0
[Network]
Address = 10.200.200.1/32
[Route]
Gateway = 10.200.200.1
Destination = 10.200.200.0/24
#/etc/systemd/network/99-wireguard.netdev
[NetDev]
Name = wg0
Kind = wireguard
Description = Wireguard
[WireGuard]
ListenPort = 51820
PrivateKey = <pk>
[WireGuardPeer]
PublicKey = <pk>
AllowedIPs = 10.200.200.2/32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment