From 0c52861ef8bc2a101153bb028ceebc6f0be6f90d Mon Sep 17 00:00:00 2001 From: dadada Date: Sun, 4 Jun 2023 19:52:01 +0200 Subject: [PATCH] Enable IPv4 routing via VPN --- nixos/modules/networking.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nixos/modules/networking.nix b/nixos/modules/networking.nix index 6e3a216..4ce6b4f 100644 --- a/nixos/modules/networking.nix +++ b/nixos/modules/networking.nix @@ -132,7 +132,7 @@ in networking.wireguard.interfaces = mkIf (cfg.vpnExtension != null) { dadada = { - ips = [ "fd42:9c3b:f96d:201::${cfg.vpnExtension}/64" ]; + ips = [ "fd42:9c3b:f96d:201::${cfg.vpnExtension}/64" "192.168.120.${cfg.vpnExtension}/24" ]; listenPort = 51234; privateKeyFile = "/var/lib/wireguard/privkey"; postSetup = '' @@ -142,7 +142,7 @@ in peers = [ { publicKey = vpnPubKey; - allowedIPs = [ "fd42:9c3b:f96d::/48" ]; + allowedIPs = [ "fd42:9c3b:f96d::/48" "192.168.120.0/24" ]; endpoint = "vpn.dadada.li:51234"; persistentKeepalive = 25; }