To easiest way to delete iptables rules, is by listing the rule with line number like below
$ sudo iptables -L OUTPUT --line-number
In this example, we are listing all the rules inside OUTPUT chain, with line number
$ sudo iptables -D OUTPUT 1
like below
We can run the first command to verify that the rule has been deleted
$ sudo iptables -L OUTPUT --line-number
like below
To delete multiple rules, just repeat the same steps over and over again.
No comments:
Post a Comment