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

Ferm allows the use of duplicate chain names #25

Closed
jhendryUK opened this issue Sep 29, 2017 · 1 comment
Closed

Ferm allows the use of duplicate chain names #25

jhendryUK opened this issue Sep 29, 2017 · 1 comment

Comments

@jhendryUK
Copy link
Contributor

This may or may not be a problem.

Some people may use this to dynamically add rules to chains. However this can be a problem if you re-use a chain name without realising, your firewall starts behaving in ways you do not expect.

I can patch this to make duplicate names be printed as a warning. Making it an error could break working configs.

Here is a test config and example output showing the situation.

iptables.ferm.txt
iptables.output.txt

@MaxKellermann
Copy link
Owner

This is actually as designed, because you can add rules to one chain in several places. For example, your includes can add more rules to a chain. But I understand your assumption that this can be error prone. Maybe a warning could be a good idea, because the original design may not be so good after all.

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