firewall.nix: Don't fail if IPv6 is disabled
This commit is contained in:
parent
3d6824feaa
commit
ac8db6fd33
@ -268,9 +268,11 @@ in
|
|||||||
# Accept all ICMPv6 messages except redirects and node
|
# Accept all ICMPv6 messages except redirects and node
|
||||||
# information queries (type 139). See RFC 4890, section
|
# information queries (type 139). See RFC 4890, section
|
||||||
# 4.4.
|
# 4.4.
|
||||||
|
${optionalString config.networking.enableIPv6 ''
|
||||||
ip6tables -A nixos-fw -p icmpv6 --icmpv6-type redirect -j DROP
|
ip6tables -A nixos-fw -p icmpv6 --icmpv6-type redirect -j DROP
|
||||||
ip6tables -A nixos-fw -p icmpv6 --icmpv6-type 139 -j DROP
|
ip6tables -A nixos-fw -p icmpv6 --icmpv6-type 139 -j DROP
|
||||||
ip6tables -A nixos-fw -p icmpv6 -j nixos-fw-accept
|
ip6tables -A nixos-fw -p icmpv6 -j nixos-fw-accept
|
||||||
|
''}
|
||||||
|
|
||||||
${cfg.extraCommands}
|
${cfg.extraCommands}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user