在RHEL7系统中,firewalld防火墙取代了iptables防火墙。我们都知道iptables的防火墙策略是交由内核层面的netfilter网络过滤器来处理的,而firewalld则是交由内核层面的nftables包过滤框架来处理。firewalld底层使用的就是iptables。
与直接控制 iptables 相比,使用 Firewalld 有两个主要区别:
- Firewalld 使用区域和服务而不是链式规则。
- 它动态管理规则集,允许更新规则而不破坏现有会话和连接。
查看firewalld防火墙状态
systemctl status firewalld
关闭防火墙
systemctl stop firewalld
开机自动关闭
systemctl disable firewalld
-——-——-——-——-———-——-——-——-——-——-——-——-——-——-——-——-——-——-—