Home>Article>Operation and Maintenance> How to close the firewall and ports in centos
Close the firewall
The specific command is as follows:
###关闭防火墙 systemctl stop firewalld.service ###查看防火墙状态 [root@rocketmq-nameserverB ~]# firewall-cmd --state not running ###禁止firewalld开机启动 systemctl disable firewalld.service
Close the specified port
The specific commands are as follows:
Check the firewall status and see if it is running
firewall-cmd --state
Close the port
firewall-cmd --remove-port=80/tcp --permanent ##永久移除80端口
Reload to make the previous port setting take effect
firewall-cmd --reload
Recommended tutorial:centos tutorial
The above is the detailed content of How to close the firewall and ports in centos. For more information, please follow other related articles on the PHP Chinese website!