2016-08-12 12:46:36 +02:00
|
|
|
{ config, lib, pkgs, ... }:
|
|
|
|
|
|
|
|
|
|
let
|
|
|
|
|
inherit (lib) mkIf mkMerge mkThenElse;
|
2017-04-24 23:22:11 +02:00
|
|
|
annuaire = config.r6d.machines;
|
2021-05-06 23:50:07 +02:00
|
|
|
currentMachine = annuaire."${config.networking.fqdn}";
|
2017-05-31 00:23:10 +02:00
|
|
|
flags = currentMachine.configurationFlags;
|
2016-08-12 12:46:36 +02:00
|
|
|
in
|
|
|
|
|
|
|
|
|
|
mkIf true {
|
2016-05-06 17:20:00 +02:00
|
|
|
|
|
|
|
|
# Utilisation d'adresse IPv6 temporaire
|
2017-04-24 23:22:11 +02:00
|
|
|
|
2016-05-31 21:09:06 +02:00
|
|
|
## https://blog.linitx.com/control-privacy-addressing-ipv6-linux/
|
|
|
|
|
## http://www.tldp.org/HOWTO/Linux+IPv6-HOWTO/x1092.html
|
2016-05-06 17:20:00 +02:00
|
|
|
|
|
|
|
|
boot.kernel.sysctl = {
|
2016-06-14 17:56:48 +02:00
|
|
|
"net.ipv6.conf.all.temp_prefered_lft" = 1800; # 30 min
|
2016-07-10 16:09:05 +02:00
|
|
|
"net.ipv6.conf.all.temp_valid_lft" = 43200; # 12 heures
|
2016-05-06 17:20:00 +02:00
|
|
|
"net.ipv6.conf.all.use_tempaddr" = 2; # activé
|
|
|
|
|
|
|
|
|
|
"net.ipv6.conf.default.temp_prefered_lft" = 3600; # 1 heure
|
2016-06-14 17:56:48 +02:00
|
|
|
"net.ipv6.conf.default.temp_valid_lft" = 3600; # 1 heure
|
2016-05-06 17:20:00 +02:00
|
|
|
"net.ipv6.conf.default.use_tempaddr" = 2; # activé
|
2016-11-28 19:43:51 +01:00
|
|
|
|
2017-08-13 14:37:29 +02:00
|
|
|
# Activation du routage
|
2016-11-28 19:43:51 +01:00
|
|
|
"net.ipv6.conf.all.forwarding" = true;
|
|
|
|
|
"net.ipv6.conf.default.forwarding" = true;
|
|
|
|
|
};
|
2016-05-06 17:20:00 +02:00
|
|
|
}
|