From 606a6738c91461aa9ea4772c2fc1b9d8f0feddfe Mon Sep 17 00:00:00 2001 From: Jean-Pierre PRUNARET Date: Fri, 6 May 2016 17:20:00 +0200 Subject: [PATCH] activation des adresses ipv6 temporaires MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit -> il y a donc plusieurs @IPv6 affectées à une machine. Une adresse qui ne devrait pas changer entre les reboot + une adresse qui change régulièrement (préférence 1h, valide 1jour) --- base.nix | 1 + networking.nix | 17 +++++++++++++++++ 2 files changed, 18 insertions(+) create mode 100644 networking.nix diff --git a/base.nix b/base.nix index 2a380fe..b151a70 100644 --- a/base.nix +++ b/base.nix @@ -4,5 +4,6 @@ imports = [ ./tools.nix ./localisation.nix + ./networking.nix ]; } diff --git a/networking.nix b/networking.nix new file mode 100644 index 0000000..f8ebd8b --- /dev/null +++ b/networking.nix @@ -0,0 +1,17 @@ +{ config, pkgs, ... }: + +{ + + # Utilisation d'adresse IPv6 temporaire + # https://blog.linitx.com/control-privacy-addressing-ipv6-linux/ + + boot.kernel.sysctl = { + "net.ipv6.conf.all.temp_prefered_lft" = 3600; # 1 heure + "net.ipv6.conf.all.temp_valid_lft" = 86400; # 1 jour + "net.ipv6.conf.all.use_tempaddr" = 2; # activé + + "net.ipv6.conf.default.temp_prefered_lft" = 3600; # 1 heure + "net.ipv6.conf.default.temp_valid_lft" = 86400; # 1 jour + "net.ipv6.conf.default.use_tempaddr" = 2; # activé + }; +}