From a2ee566f155e11defd7d75a5f7016ca2573964b8 Mon Sep 17 00:00:00 2001 From: Jean-Pierre PRUNARET Date: Mon, 28 Nov 2016 19:43:51 +0100 Subject: [PATCH] net: activation du forwarding pour IPv4 et IPv6 --- public/network-ipv6.nix | 5 ++++- public/network.nix | 5 +++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/public/network-ipv6.nix b/public/network-ipv6.nix index 16337ed..d3f9f0d 100644 --- a/public/network-ipv6.nix +++ b/public/network-ipv6.nix @@ -22,5 +22,8 @@ mkIf true { "net.ipv6.conf.default.temp_prefered_lft" = 3600; # 1 heure "net.ipv6.conf.default.temp_valid_lft" = 3600; # 1 heure "net.ipv6.conf.default.use_tempaddr" = 2; # activé - }; + + "net.ipv6.conf.all.forwarding" = true; + "net.ipv6.conf.default.forwarding" = true; + }; } diff --git a/public/network.nix b/public/network.nix index cd89819..ed45a70 100644 --- a/public/network.nix +++ b/public/network.nix @@ -15,4 +15,9 @@ mkIf true { networking.extraHosts = '' 127.0.0.1 ${config.networking.hostName} ''; + + boot.kernel.sysctl = { + "net.ipv4.conf.all.forwarding" = true; + "net.ipv4.conf.default.forwarding" = true; + }; }