1.安装iptables管理工具
yum install iptables-services -y
2.加载防火墙模块
modprobe ip_tables
modprobe iptable_filter
modprobe iptable_nat
modprobe ip_conntrack
modprobe ip_conntrack_ftp
modprobe ip_nat_ftp
modprobe ipt_state
3.查看已经加载的模块
lsmod |egrep 'filter|nat|ipt'
4.启动防火墙
首先停止firewalld
systemctl stop firewalld
systemctl disable firewalld
开启iptables
systemctl start iptables.service
systemctl enable iptables.service