Udgivet i

List iptables and removing chain number X

First off list all IPTable’s rules by chain number:

iptables -vnL --line-numbers

Then delete the line you want:

iptables -D INPUT 22

This will delete chain line number 22

or

iptables-save > /home/iptables.txt

Deltete lines in iptables.txt and:

iptables-restore < /home/iptables.txt