How does linux check the status of the firewall and turn on and off commands
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!