CentOS7默认的防火墙不是iptables,而是firewalle.
安装iptable iptable-service教程如下:
1.先检查是否安装了iptables
service iptables status
a.安装iptables
yum install -y iptables
b.升级iptables
yum update iptables
c.安装iptables-services
yum install iptables-services
2.禁用/停止自带的firewalld服务
a.停止firewalld服务
systemctl stop firewalld
b.禁用firewalld服务
systemctl mask firewalld