Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

networking.firewall.allowed{TCP,UDP}Ports should not generate duplicate filtering rules #56086

Closed
delroth opened this issue Feb 20, 2019 · 2 comments

Comments

@delroth
Copy link
Contributor

delroth commented Feb 20, 2019

Issue description

networking.firewall.allowedTCPPorts = [ 443 443 ];

Seems to generate two identical iptables rules instead of just one. This kind of configuration can easily happen when multiple independent modules append the same port to the list.

IMO it would be worth de-duplicating ports (and maybe sorting?) so that the generated firewall configuration is easier to read.

Technical details

  • system: "x86_64-linux"
  • host os: Linux 4.14.98, NixOS, 19.03.git.4f4ff1b (Koi)
  • multi-user?: yes
  • sandbox: yes
  • version: nix-env (Nix) 2.2
  • channels(delroth): ""
  • nixpkgs: /nix/var/nix/profiles/per-user/root/channels/nixos
@peterhoeg
Copy link
Member

Great idea - want to take a stab at a PR?

@delroth
Copy link
Contributor Author

delroth commented Mar 9, 2019

#57139

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants