下载64位安装包,下载地址https://download.csdn.net/download/wozmaini303/13183024
iptables-1.4.21-34.el7.x86_64.rpm
iptables-services-1.4.21-34.el7.x86_64.rpm
sed -i 's/SELINUX=enforcing/SELINUX=disabled/g' /etc/selinux/config
systemctl stop firewalld
systemctl disable firewalld
使用 rpm -qa|grepiptables命令进行验证是否已经安装了iptables.service
安装iptables和iptables-service
rpm -Uvh iptables-1.4.21-18.2.el7_4.x86_64.rpm
rpm -Uvh iptables-services-1.4.21-18.2.el7_4.x86_64.rpm
验证安装成功
用rpm -qa|grep iptables命令进行验证
iptables-1.4.21-18.2.el7_4.x86_64
iptables-services-1.4.21-18.2.el7_4.x86_64
只有两者同时有了才表明安装成功
启动iptables.service,并查看规则
systemctl start iptables.service
iptables -L