Home > Operation and Maintenance > CentOS > How to check whether the firewall is enabled in centos7

How to check whether the firewall is enabled in centos7

Release: 2020-03-20 15:52:32
Original
8168 people have browsed it

How to check whether the firewall is enabled in centos7

1. Firewall opening, closing, and disabling commands

Recommended tutorial: centos usage tutorial

(1) Settings Enable the firewall at boot: systemctl enable firewalld.service

(2) Set the firewall to be disabled at boot: systemctl disable firewalld.service

(3) Start the firewall: systemctl start firewalld

( 4) Turn off the firewall: systemctl stop firewalld

(5) Check the firewall status: systemctl status firewalld

2. Use firewall-cmd to configure the port

(1) View firewall status: firewall-cmd --state

(2) Reload configuration: firewall-cmd --reload

(3) View open Port: firewall-cmd --list-ports

(4) Open the firewall port: firewall-cmd --zone=public --add-port=9200/tcp --permanent

related Video tutorial recommendation: linux video tutorial

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

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template