- 查看防火状态
systemctl status firewalld service iptables status
- 暂时关闭防火墙
systemctl stop firewalld service iptables stop
- 永久关闭防火墙
systemctl disable firewalld chkconfig iptables off
- 启动防火墙
systemctl start firewalld
- 重启防火墙
systemctl enable firewalld service iptables restart
- 设置开机启动
systemctl enable firewalld
- 停止并禁用开机启动
sytemctl disable firewalld
- 在指定区域打开端口(记得重启防火墙)
永久生效再加上 --permanentfirewall-cmd --zone=public --add-port=80/tcp
firewall-cmd --zone=public --add-port=5060-5059/udp --permanent
Linux防火墙相关命令(开启防火墙、关闭防火墙、添加ip白名单等)
最新推荐文章于 2024-07-22 17:44:07 发布