Home  >  Article  >  Operation and Maintenance  >  How to check firewall status in Linux

How to check firewall status in Linux

尚
Original
2019-12-25 16:39:5511358browse

How to check firewall status in Linux

There are two ways to check the firewall in Linux:

1. Service method

Check the firewall status:

[root@centos6 ~]# service iptables status
iptables:未运行防火墙。

Turn on the firewall:

[root@centos6 ~]# service iptables start

Turn off the firewall:

[root@centos6 ~]# service iptables stop

2. iptables method

Enter init first. d directory, the command is as follows:

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

Check the firewall status:

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

Related recommendations: linux tutorial

The above is the detailed content of How to check firewall status in Linux. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn