iptables -F

Support for security such as Firewalls and securing linux
Posts: 2
Joined: 2018/01/16 21:11:06

iptables -F

Postby hopesfall » 2018/01/16 21:28:34

When I run the following command "iptables -F" for removing all firewall rules all connections (for example ssh) are lost/disconnected.
And I can't connect anymore to my server (ssh, http, ping ...)
iptables -L on the console gives the following output:

Code: Select all

Chain INPUT (policy ACCEPT)
target     prot opt source               destination         

Chain FORWARD (policy ACCEPT)
target     prot opt source               destination         

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination

Is this normal behaviour ?

User avatar
Forum Moderator
Posts: 2340
Joined: 2010/12/01 19:25:52
Location: Helsinki, Finland

Re: iptables -F

Postby avij » 2018/01/16 21:44:30

There are also other tables besides the default filter table. iptables -F will only touch the "filter" table.

for table in filter nat mangle raw security; do iptables -L -n -v -t $table; done may show something more.