How to List and Clear IPtables rules on a Linux Server

This tutorial explains how you can list all current iptables rules on a RedHat / CentOS Linux server, and how you can clear / flush current iptables rules.

How to list current iptables rules

Below command will list of current iptables rules of your CentOS / RedHat Linux server.

iptables -L

How to Clear / Flush iptables rules

Use below command to delete / clear / flush all current iptables rules of your CentOS / RedHat Linux server.

iptables -F

If your server went down after flushing iptables, please refer to following tutorials:
Solution – Server Down after Flushing IPtables

Our Top Rated Host

Related Posts