fix-wireguard

This commit is contained in:
Leon Vita 2022-09-25 17:11:45 +01:00
parent 96bae6b4e2
commit 4527a038fd

View File

@ -59,7 +59,7 @@ in
networking.firewall = { networking.firewall = {
allowedTCPPorts = [ 80 443 22 ]; allowedTCPPorts = [ 80 443 22 ];
allowedUDPPorts = [ 51820 ]; allowedUDPPorts = [ 18800 ];
}; };
#------------------DOCKER---------------------------- #------------------DOCKER----------------------------
@ -73,14 +73,13 @@ in
networking.wireguard.interfaces = { networking.wireguard.interfaces = {
wg0 = { wg0 = {
ips = [ "10.10.11.4/24" ]; ips = [ "10.10.11.4/24" ];
listenPort = 51820;
privateKeyFile = "/etc/nixos/wireguard-keys/private-key"; privateKeyFile = "/etc/nixos/wireguard-keys/private-key";
peers = [ peers = [
{ {
publicKey = "w3qegSSuqFTFrGk4XJaWBSwGDOiqbnnAIR9MzwjYVA8="; publicKey = "w3qegSSuqFTFrGk4XJaWBSwGDOiqbnnAIR9MzwjYVA8=";
allowedIPs = [ "10.10.11.0" ]; allowedIPs = [ "10.10.11.0/24" ];
endpoint = "81.201.149.152:18800"; endpoint = "45.158.40.162:18800";
persistentKeepalive = 25; persistentKeepalive = 25;
} }
]; ];