安装Iptables 服务:
yum install iptables-services
停止firewalld:
systemctl stop firewalld
mask firewalld:
systemctl mask firewalld service iptables save
===================================================
查看firewall状态
systemctl status firewalld.service
屏蔽iptables命令:
systemctl status iptables
systemctl stop iptables
systemctl mask iptables
设置默认zone为public
firewall-cmd --set-default-zone=public
添加8080tcp端口
firewall-cmd --permanent --zone=public --add-port=8080/tcp
查看当前public zone配置情况
firewall-cmd --permanent --zone=public --list-all
时间: 2024-10-10 06:22:51