diff --git a/modules/services/networking/firewall.nix b/modules/services/networking/firewall.nix index 64cfcef124a..a72ba796773 100644 --- a/modules/services/networking/firewall.nix +++ b/modules/services/networking/firewall.nix @@ -33,7 +33,9 @@ let # Helper command to manipulate both the IPv4 and IPv6 tables. ip46tables() { iptables "$@" - ip6tables "$@" + ${optionalString config.networking.enableIPv6 '' + ip6tables "$@" + ''} } '';