Change net mask on wireguard hosts

This commit is contained in:
Victor Mignot 2023-12-24 20:41:29 +01:00
parent 523923d77c
commit 7dbadf9101
Signed by: dala
GPG key ID: 5E7F2CE1BEAFED3D
2 changed files with 5 additions and 5 deletions

View file

@ -6,7 +6,7 @@
/* Wireguard */ /* Wireguard */
networking.wireguard.interfaces.wg0 = { networking.wireguard.interfaces.wg0 = {
ips = [ "10.100.0.6/24" ]; ips = [ "10.100.0.6/8" ];
listenPort = 51820; listenPort = 51820;
privateKeyFile = config.sops.secrets.wg0_private.path; privateKeyFile = config.sops.secrets.wg0_private.path;
@ -41,7 +41,7 @@
}; };
networking.wireguard.interfaces.wg1 = { networking.wireguard.interfaces.wg1 = {
ips = [ "10.100.1.1" ]; ips = [ "10.100.1.1/8" ];
listenPort = 51821; listenPort = 51821;
privateKeyFile = config.sops.secrets.wg1_private.path; privateKeyFile = config.sops.secrets.wg1_private.path;
interfaceNamespace = "wg1ns"; interfaceNamespace = "wg1ns";

View file

@ -73,7 +73,7 @@
/* Wireguard */ /* Wireguard */
networking.wg-quick.interfaces.wg0 = { networking.wg-quick.interfaces.wg0 = {
address = [ "10.100.0.4/24" ]; address = [ "10.100.0.4/8" ];
dns = [ "10.100.0.1" ]; dns = [ "10.100.0.1" ];
listenPort = 51820; listenPort = 51820;
@ -84,7 +84,7 @@
# Rock Pro 64 # Rock Pro 64
publicKey = "XVmG3/rNsCqc8KCmOx3+UUn9DJOnJ40Uxid5JGdChR4="; publicKey = "XVmG3/rNsCqc8KCmOx3+UUn9DJOnJ40Uxid5JGdChR4=";
endpoint = "${extraInfo.wireguard.rockProEndpoint}:51820"; endpoint = "${extraInfo.wireguard.rockProEndpoint}:51820";
allowedIPs = [ "10.100.0.1" ]; allowedIPs = [ "10.100.0.1/8" ];
persistentKeepalive = 25; persistentKeepalive = 25;
} }
@ -92,7 +92,7 @@
# VPS # VPS
publicKey = "x45YsLDpMJw1pwKOvkyzdesen3lFcKpxCXACGz+xtDs="; publicKey = "x45YsLDpMJw1pwKOvkyzdesen3lFcKpxCXACGz+xtDs=";
endpoint = "${extraInfo.wireguard.VPSEndpoint}:51820"; endpoint = "${extraInfo.wireguard.VPSEndpoint}:51820";
allowedIPs = [ "10.100.0.2" ]; allowedIPs = [ "10.100.0.2/8" ];
persistentKeepalive = 25; persistentKeepalive = 25;
} }
]; ];