Skip to content

Commit 81c6240

Browse files
Merge pull request #241 from NuschtOS/containers-nftables
containers: fix networking when nftables is activated
2 parents c702134 + 00ec90a commit 81c6240

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

modules/containers.nix

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,11 +44,11 @@ in
4444
useIPTables = !config.networking.nftables.enable;
4545
in lib.mkIf cfgd.recommendedDefaults {
4646
fixed-cidr-v6 = "fd00::/80"; # TODO: is this a good idea for all networks?
47-
iptables = useIPTables;
48-
ip6tables = useIPTables;
47+
iptables = lib.mkIf useIPTables true;
48+
ip6tables = lib.mkIf useIPTables true;
4949
ipv6 = true;
5050
# userland proxy is slow, does not give back ports and if iptables/nftables is available it is just worse
51-
userland-proxy = false;
51+
userland-proxy = lib.mkIf useIPTables false;
5252
};
5353

5454
autoPrune = lib.mkIf cfgd.aggressiveAutoPrune {

0 commit comments

Comments
 (0)