Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

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

2025-03-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

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!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report