HostOnNet Blog

iptables -F block all ports

Looking for Linux Server Admin or WordPress Expert? We can help.

Today i run iptables -F on a server, that blocked access to all ports. This was a Plesk server with firewall enabled through Plesk control panel.

This is because default policy is set to DROP all connections.

Before you run

iptables -F

Make sure default policy is set to allow. if it is set to DROP as shown below, you won’t be able to connect to server once firewall rules are flushed.

[root@u18953237 ~]# iptables -L -n | grep policy
Chain INPUT (policy DROP)
Chain FORWARD (policy DROP)
Chain OUTPUT (policy DROP)
[root@u18953237 ~]# 

See iptables

Posted in Linux

Leave a Reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.