====== IP-tables delete rule ======
You may also use the rule's number (--line-numbers):
iptables -L INPUT --line-numbers
Example output :
Chain INPUT (policy ACCEPT)
num target prot opt source destination
1 ACCEPT udp -- anywhere anywhere udp dpt:domain
2 ACCEPT tcp -- anywhere anywhere tcp dpt:domain
3 ACCEPT udp -- anywhere anywhere udp dpt:bootps
4 ACCEPT tcp -- anywhere anywhere tcp dpt:bootps
So if you would like to delete second rule :
iptables -D INPUT 2
Then save iptables :
# iptables-save
or
# service iptables save