The iptables rules can be annotated with comments. How to select and remove rules using these comments?Maybe there is another solution to tag rules and remove them based on that tag?
Find my rules in iptables
iptables
you can use fallowing command to list all rule in a file.iptables-save >abc.txt Now you can edit abc.txt file as you want.Then restore with below commandiptables-restore < abc.txt