-
-
Save asymmetric/e711a8ebce0f3cba7dde7ea3d85aa0a9 to your computer and use it in GitHub Desktop.
wireguard
This file contains 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
wireguard.interfaces.wg0 = { | |
ips = [ "10.100.0.2/24" ]; | |
privateKeyFile = "/home/asymmetric/wireguard-keys/private"; | |
peers = [ | |
{ | |
publicKey = "xPjzdx0RA9RuAR0HFA+VCLOglgeKKqVyTa3FXDX6Ejs="; | |
allowedIPs = [ "10.100.0.1/32" ]; | |
endpoint = "159.69.55.136:51820"; | |
persistentKeepalive = 25; | |
} | |
]; | |
}; |
This file contains 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
networking.nat = { | |
enable = true; | |
externalInterface = "ens3"; | |
internalInterfaces = [ "wg0" ]; | |
}; | |
networking.wireguard.interfaces = { | |
wg0 = { | |
ips = [ "10.100.0.1/24" ]; | |
listenPort = 51820; | |
privateKeyFile = "/root/wireguard-private-key"; | |
peers = [ | |
{ | |
# asymmetric@tachikoma | |
publicKey = "gTqmM3TXHUAunBn59SJdKs9sDn0pMaPXdaFJXO3wxQM="; | |
allowedIPs = [ "10.100.0.2/32" ]; | |
} | |
]; | |
}; | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment