iptables -F lock me out

After i type

server goes down. Can’t connect to web or ssh, seems all connection is locked by iptables.

SOLUTION

This is because the chain policy for the firewall input chain was set to DROP

check with “iptables –list” you will see “Chain INPUT (policy DROP)”.

If this is the case, before you run a flush, ensure you set the input chain policy to ACCEPT by running.

Then you will be able to run iptables -F without any problem.

When you try modifying firewall rules, better set a cronjob with following commands that run every 5 or 10 minutes, so if you get locked out, you will be able to get access again after the cronjob runs.

See iptables

Need help with Linux Server or WordPress? We can help!

Leave a Reply

Your email address will not be published. Required fields are marked *