關(guān)閉防火墻
具體命令如下:
###關(guān)閉防火墻 systemctl stop firewalld.service ###查看防火墻狀態(tài) [root@rocketmq-nameserverB ~]# firewall-cmd --state not running ###禁止firewalld開(kāi)機(jī)啟動(dòng) systemctl disable firewalld.service
關(guān)閉指定端口
具體命令如下:
查看防火墻狀態(tài),是否是running
firewall-cmd --state
關(guān)閉端口
firewall-cmd --remove-port=80/tcp --permanent ##永久移除80端口
重載使剛才的端口設(shè)置生效
firewall-cmd --reload
推薦教程:centos教程