Hi I am planning to build firewall UI for iptables command line. Can anyone please let me know is there any way to automatically validate the rules in the table.
For instance , intially
1> i add a rule to drop telnet connections from anywhere.
2>then i add a rule to accept telnet connections from anywhere.
for 2nd rule currently i delete the first rule by searching in the table and then add the 2nd rule.
So in the above case, is there a way by which i can say to delete the 1st rule automatically as its exactly inverse of 2nd one.
Please let me know.