1.查看防火墻狀態(tài):
命令:systemctl status firewalld.service
開(kāi)啟防火墻時(shí),提示沒(méi)有安裝防火墻
[root@localhost ~]# systemctl start firewalld.service
Failed to start firewalld.service: Unit not found.
2.安裝防火墻
[root@localhost ~]# yum install firewalld
2.開(kāi)啟防火墻
[root@localhost ~]# systemctl start firewalld.service
3.開(kāi)啟端口
[root@localhost ~]# firewall-cmd --add-port=5889/tcp --permanent
success
4.重啟防火墻文章來(lái)源:http://www.zghlxwxcb.cn/news/detail-662354.html
[root@localhost ~]# firewall-cmd --reload
success
5.查看開(kāi)啟端口號(hào)文章來(lái)源地址http://www.zghlxwxcb.cn/news/detail-662354.html
[root@localhost ~]# firewall-cmd --list-ports
5889/tcp
到了這里,關(guān)于centos 安裝防火墻,并開(kāi)啟對(duì)應(yīng)端口號(hào)的文章就介紹完了。如果您還想了解更多內(nèi)容,請(qǐng)?jiān)谟疑辖撬阉鱐OY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!