centos7使用iptables防火牆配置

centos7默認使用的firewall防火牆配置centos

關閉firewall:
systemctl stop firewalld.service #中止firewall
systemctl disable firewalld.service #禁止firewall開機啓動tcp

安裝iptables防火牆
yum install iptables-services #安裝
centos7

更6.X版本同樣修改防火牆配置spa

vi /etc/sysconfig/iptables
-A INPUT -m state --state NEW -m tcp -p tcp --dport 80 -j ACCEPT #容許80端口經過防火牆
ip

相關文章
相關標籤/搜索