aboutsummaryrefslogtreecommitdiff
path: root/nixos/modules/router.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixos/modules/router.nix')
-rw-r--r--nixos/modules/router.nix8
1 files changed, 6 insertions, 2 deletions
diff --git a/nixos/modules/router.nix b/nixos/modules/router.nix
index cd37d8b..224037b 100644
--- a/nixos/modules/router.nix
+++ b/nixos/modules/router.nix
@@ -56,6 +56,8 @@ in {
};
config = mkIf cnf.enable {
+ boot.kernel.sysctl."net.ipv6.conf.all.forwarding" = 1;
+
networking = {
useNetworkd = true;
firewall = {
@@ -114,9 +116,10 @@ in {
matchConfig.Name = "home";
networkConfig = {
Address = "${cnf.lanIP}/${toString cnf.lanPrefix}";
- IPForward = "yes";
+ IPv4Forwarding = "yes";
DHCPServer = "yes";
DHCPPrefixDelegation = "yes";
+ IPv6Forwarding = "yes";
IPv6SendRA = "yes";
IPv6AcceptRA = "no";
};
@@ -143,9 +146,10 @@ in {
matchConfig.Name = "guest";
networkConfig = {
Address = "192.168.1.1/24";
- IPForward = "yes";
+ IPv4Forwarding = "yes";
DHCPServer = "yes";
DHCPPrefixDelegation = "yes";
+ IPv6Forwarding = "yes";
IPv6SendRA = "yes";
IPv6AcceptRA = "no";
};