iptables duplicate rules.
Hello.
How can I remove any duplicate iptables rule? any command exist? Tnx. |
Quote:
|
I found below link :
http://www.krazyworks.com/remove-dup...ptables-rules/ |
Thanks for sharing. Does seem harmless but do test before using because I found it removed the last "COMMIT" line so if you expect the rule set to be loaded on boot it may fail to complete for not seeing that line...
|
I'm out if my comfort zone here, but I don't think the code in that link works (actually, it is more that the idea does not work). I think if you run it against a set of rules that has duplicates in different chains, which you would have done deliberately, it will remove those dupes.
Safer done manually, for any reasonable number of rules. |
All times are GMT -5. The time now is 03:13 PM. |