How to flush your server's firewall and IP tables

All servers use IP tables to decide what can access the server and how. If you are blocked from a certain service you can normally gain access by logging in as root and running a command to clear the IP tables. This code is: 

To flush a Single Chain

To flush a specific chain, which will delete all of the rules in the chain, you may use the -F, or the equivalent --flush, option and the name of the chain to flush.

For example, to delete all of the rules in the INPUT chain, run this command:

  • sudo iptables -F INPUT

To flush All Chains

To flush all chains, which will delete all of the firewall rules, you may use the -F, or the equivalent --flush, option by itself:

  • sudo iptables -F

If you already added a Firewall program like CSF you would want to use the CSF command to flush the block which is: 

  • csf -f
  • vps, dedicated, server, ssh, root, iptables, csf, unblock, clear block, flush iptables, flush csf
  • 14 Users Found This Useful
Was this answer helpful?

Related Articles

How to add MediaInfo to a VPS or Dedicated Server

wget http://mediaarea.net/download/binary/libzen0/0.4.29/libzen0-0.4.29-1.x86_64.CentOS_6.rpmwget...

How to add MediaInfo to a VPS or Dedicated Server

wget http://mediaarea.net/download/binary/libzen0/0.4.29/libzen0-0.4.29-1.x86_64.CentOS_6.rpmwget...

How to force cPanel backups through SSH

All you need to do is run this one line from SSH from your cPanel based server that has the new...

How to force cPanel backups through SSH

All you need to do is run this one line from SSH from your cPanel based server that has the new...

What type of Virtualization do you use?

We use KVM by default and on some specialized plans we use OpenVZ