Get the App
SLTechnology News&Howtos  ›  Servers  › 

How does linux check the status of the firewall and turn on and off commands

Shulou Source: shulou.com Published: 2022-06-01 20:42:14 11月01日 Update

Editor to share with you how linux check the firewall status and turn on and off commands. I hope you will get something after reading this article. Let's discuss it together.

There are two ways for linux to check the status of the firewall and enable and close the command:

I. service mode

View firewall status:

[root@centos6 ~] # service iptables status

Iptables: the firewall is not running.

Turn on the firewall:

[root@centos6 ~] # service iptables start

Turn off the firewall:

[root@centos6 ~] # service iptables stop

II. Iptables mode

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

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

And then

View firewall status:

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

Temporarily turn off the firewall:

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

Restart iptables:

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

The above two commands are commonly used to check the status of the firewall and turn it on and off under linux.

What is Linux system Linux is a free-to-use and free-spread UNIX-like operating system, is a POSIX-based multi-user, multi-task, multi-threaded and multi-CPU operating system, using Linux can run major Unix tools, applications and network protocols.

After reading this article, I believe you have a certain understanding of "linux how to check firewall status and turn on and off commands". If you want to know more about it, welcome to follow the industry information channel, thank you for reading!

Tags: Firewall fire protection command state mode system operating system article run freedom task done that is tools tool software commonly used applications more users directories Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno NVidia MariaDB Shulou Information Shulou Tech Info OPPO Reno