Compare commits

..

1 Commits

Author SHA1 Message Date
448e4dfda8
Add Wireguard configuration 2021-03-12 12:11:15 +01:00

View File

@ -43,7 +43,7 @@
1194 # Wireguard
];
extraCommands = ''
iptables -t nat -A POSTROUTING -s 10.8.0.0/24 -o eth0 -j MASQUERADE
iptables -t nat -A POSTROUTING -s 10.9.0.0/24 -o eth0 -j MASQUERADE
'';
};
@ -57,7 +57,7 @@
# Wireguard setup
networking.wireguard.interfaces = {
wg0 = {
ips = [ "10.8.0.1/24" ];
ips = [ "10.9.0.1/24" ];
listenPort = 1194;
privateKeyFile = "/home/coace/.wg/keys/privatekey";
peers = [
@ -65,7 +65,7 @@
{
# Placeholder public key
publicKey = "XMkTztU2Y8hw6Fu/2o4Gszij+EmNacvFMXuZyHS1n38=";
allowedIPs = [ "10.8.0.2/32" ];
allowedIPs = [ "10.9.0.2/32" ];
}
];
};