26.3.2.4 Deleting Rules in a Chain

Use the iptables -D command to delete a rule in a chain. For example, the following command deletes rule 4 from the INPUT chain:

# iptables -D INPUT 4

To delete all rules in a chain, enter:

# iptables -F chain

To delete all rules in all chains, enter:

# iptables -F