enable ipv6 networking on DMZ
This commit is contained in:
parent
76501362f7
commit
13f0f036e9
4 changed files with 9 additions and 5 deletions
|
@ -113,6 +113,7 @@
|
|||
tcpdump
|
||||
lsof
|
||||
parted
|
||||
radvd
|
||||
];
|
||||
|
||||
hardware.cpu.intel.updateMicrocode =
|
||||
|
|
|
@ -124,9 +124,9 @@ in {
|
|||
linkConfig.RequiredForOnline = "carrier";
|
||||
|
||||
networkConfig = {
|
||||
IPv6AcceptRA = false;
|
||||
LinkLocalAddressing = "no";
|
||||
DHCP = lib.mkIf cfg.allowDMZConnectivity "yes";
|
||||
IPv6AcceptRA = cfg.allowDMZConnectivity;
|
||||
LinkLocalAddressing = if cfg.allowDMZConnectivity then "ipv6" else "no";
|
||||
DHCP = lib.mkIf (cfg.allowDMZConnectivity && cfg.staticDMZIpv4Address != "") "yes";
|
||||
Address = lib.mkIf (cfg.staticDMZIpv4Address != "") cfg.staticDMZIpv4Address;
|
||||
};
|
||||
};
|
||||
|
|
|
@ -21,6 +21,8 @@ in
|
|||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
lab.networking.allowDMZConnectivity = true;
|
||||
|
||||
networking.firewall.interfaces.${config.lab.networking.dmzBridgeName} = {
|
||||
allowedTCPPorts = [ 53 5353 ];
|
||||
allowedUDPPorts = [ 53 67 5353 ];
|
||||
|
@ -30,8 +32,6 @@ in
|
|||
bind = {
|
||||
enable = true;
|
||||
forwarders = [ ];
|
||||
# TODO: disable ipv6 for now, as the hosts themselves lack routes it seems.
|
||||
ipv4Only = true;
|
||||
|
||||
extraOptions = ''
|
||||
allow-transfer { none; };
|
||||
|
|
|
@ -24,6 +24,7 @@ in
|
|||
|
||||
dhcp-range = [
|
||||
"192.168.30.50,192.168.30.127,15m"
|
||||
"2a0d:6e00:1a77:30::,ra-stateless,ra-names"
|
||||
];
|
||||
|
||||
dhcp-host = [
|
||||
|
@ -34,9 +35,11 @@ in
|
|||
dhcp-option = [
|
||||
"3,${dmzRouterIPv4}"
|
||||
"option:dns-server,${dmzRouterIPv4}"
|
||||
"option6:dns-server,[2a02:58:19a:30::1]"
|
||||
];
|
||||
|
||||
address = [
|
||||
"/ns.pizzapim.nl/ns.geokunis2.nl/${dmzDHCPIPv4}"
|
||||
# "/ns.pizzapim.nl/ns.geokunis2.nl/TODOIPV6"
|
||||
];
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue