1. 从红帽RHEL7系统及以后的版本中firewalld服务取代了iptables服务,但依然可以使用iptables命令来管理内核的netfilter。
PREROUTING:在进行路由选择前处理数据包
INPUT:处理入站的数据包
OUTPUT:处理出站的数据包
FORWARD:处理转发的数据包
POSTROUTING:在进行路由选择后处理数据包
raw表:确定是否对该数据包进行状态跟踪
mangle表:为数据包设置标记
nat表:修改数据包中的源、目标IP地址或端口
filter表:确定是否放行该数据包(过滤)
关闭firewall:
[root@linuxprobe ~]# systemctl stop firewalld.service #停止firewall
[root@linuxprobe ~]# systemctl disable firewalld.service #禁止firewall开机启动
关闭iptables:
[root@linuxprobe ~]# systemctl stop iptables.service #停止iptables服务
其他参数:
[root@linuxprobe ~]# systemctl start iptables #开启iptables防火墙
[root@linuxprobe ~]# systemctl restart iptables.service #重启防火墙使配置
[root@linuxprobe ~]# systemctl enable iptables.service #设置防火墙开机启动