CentOS7自带防火墙firewalld
关闭centos7自带防火墙 firewalld 并重启服务器
systemctl stop firewalld.service && systemctl disable firewalld.service && reboot
查看 firewalld 防火墙状态
systemctl status firewalld
重启 firewalld 防火墙
systemctl restart firewalld
处理报错AllowZoneDrifting
编辑文件
vi /etc/firewalld/firewalld.conf
修改文字
AllowZoneDrifting = no
修改防火墙为 iptables
关闭自带防火墙
systemctl stop firewalld.service
关闭自带防火墙开机启动
systemctl disable firewalld.service
卸载默认firewalld
systemctl stop firewalld
systemctl mask firewalld
更新iptables
yum update iptables
安装iptabls
yum install -y iptables
yum install iptables-services
设置默认规则
iptables -F
iptables -P INPUT ACCEPT
iptables -X
重启iptables
service iptables restart
CentOS8
/bin/systemctl restart iptables.service
设置开机自启
systemctl enable iptables.service
评论 (0)