systemctlstopfirewalld.service#停止firewall
systemctldisablefirewalld.service#禁止firewall開機(jī)啟動
firewall-cmd–state#查看默認(rèn)防火墻狀態(tài)(關(guān)閉后顯示notrunning,開啟后顯示running)
7.命令含義:
–zone#作用域
–add-port=80/tcp#添加端口,格式為:端口/通訊協(xié)議
–permanent#永久生效,沒有此參數(shù)重啟后失效關(guān)閉firewall,安裝iptables
CentOS 7默認(rèn)使用的是firewall作為防火墻,使用iptables必須重新設(shè)置一下1.關(guān)閉防火墻,禁止開啟啟動
systemctlstopfirewalld.service
systemctldisablefirewalld.service
2.安裝 iptables service
yum-yinstalliptables-services
3.后續(xù)即可使用iptable命令操作來管理防火墻
更多關(guān)于云服務(wù)器,域名注冊,虛擬主機(jī)的問題,請訪問西部數(shù)碼官網(wǎng):m.bingfeng168.cn