iptables -D INPUT -p tcp --dport 80 -j ACCEPT

Category: Networking

iptables -D INPUT -p tcp --dport 80 -j ACCEPT

Delete a specific firewall rule

-D deletes the first rule that matches the given specification. You must provide the exact same parameters as when the rule was added. Alternatively, use --line-numbers with iptables -L and delete by number with -D INPUT <number>.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.