Get the App
SLTechnology News&Howtos  ›  Servers  › 

Linux command to see if the firewall is turned off

Shulou Source: shulou.com Published: 2022-06-03 07:52:55 12月06日 Update

Today, what the editor shares with you is the command of linux to check whether the firewall is turned off. Many people don't know much about it. Today, in order to let you know more about linux, I summarized the following contents for you. Let's look down together. I'm sure you'll get something.

I. service mode

View firewall status:

[root@centos6 ~] # service iptables statusiptables: firewall is not running.

II. Iptables mode

Enter the init.d directory first, and use the following command:

[root@centos6 ~] # cd / etc/init.d/ [root@centos6 init.d] #

Then check the firewall status:

[root@centos6 init.d] # / etc/init.d/iptables status

This is the end of the command for linux to check whether the firewall is closed, of course, not just the above and everyone's analysis, but the editor can ensure its accuracy is absolutely no problem. I hope that the above content can have a certain reference value for everyone, and can be put into practice. If you like this article, you might as well share it for more people to see.

Tags: Firewalls fire prevention commands content methods status application of knowledge value accuracy methods articles more catalogs see problems assurance analysis reference operation Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Shulou Tech Info Linux NVidia Shulou Information Docker