CentOS7開始,默認是沒有iptables的,而是使用firewall防火牆。本文將屏蔽掉firewall,使用iptables
Centos7版本解決方法:
1、停止並屏蔽firewalld服務
停止 systemctl stop firewalld
屏蔽 systemctl mask firewalld
2、安裝iptables-service軟件包
yum install iptables-services
3、在引導時啓用iptables服務
systemctl enable iptables
4、啓動iptables服務
systemctl start iptables
5、保存防火牆規則
service iptables save