milahu / nixpkgs

Nix Packages collection
MIT License
0 stars 0 forks source link

nixos firewall: deprecate iptables in favor of nftables #32

Open milahu opened 4 months ago

milahu commented 4 months ago

nixos/modules/virtualisation/nixos-containers.nix is using networking.nftables i dont see how exactly but when i disable nftables in tor.nix with networking.nftables.enable = false; then i get the error

error: The option `containers.asdf.networking.nftables.enable' has conflicting definition values:
- In `nixos/modules/services/security/tor.nix': false
- In `nixos/modules/virtualisation/nixos-containers.nix': true

when i disable nftables in tor.nix

probably i should not do that and set firewall rules either via iptables, or via nftables assuming that both ways "just work"

currently, nixos services use the iptables command to add and remove firewall rules no nixos services seems to use the nft command

related

Firewall improvements/suggestions/discussion nixpkgs#21974

iptables: switch from iptables-legacy to iptables-nftables-compat nixpkgs#81172?

nftables module: absorb into firewall module, rename ruleset options nixpkgs#161428

nixos/{firewall,nat}: Standardize around an iptables-restore / nftables solution nixpkgs#4155