重啟防火墻命令 centos7為什么要關(guān)閉firewall防火墻?
centos7為什么要關(guān)閉firewall防火墻?CentOS 7.0默認使用防火墻作為防火墻。如果使用iptables,則必須重置它。1直接關(guān)閉防火墻系統(tǒng)CTL stop防火墻服務(wù)#停止firewa
centos7為什么要關(guān)閉firewall防火墻?
CentOS 7.0默認使用防火墻作為防火墻。如果使用iptables,則必須重置它。1直接關(guān)閉防火墻系統(tǒng)CTL stop防火墻服務(wù)#停止firewallsystemctl禁用防火墻服務(wù)#禁用防火墻啟動2。Set iptables serviceum-y install iptables services如果您想修改防火墻配置,例如添加防火墻端口3306vi/etc/sysconfig/iptables,add rules-a input-M state--state new-M TCP-P TCP--dport 3306-J accept,保存并退出systemctl restartiptables.service服務(wù)#重新啟動防火墻以使配置生效systemctl enableiptables.service服務(wù)#將防火墻設(shè)置為啟動,最后重新啟動系統(tǒng)以使設(shè)置生效。