查看防火状态
- systemctl status firewalld
- service iptables status
关闭防火墙
- systemctl stop firewalld
- service iptables stop
永久关闭防火墙
- systemctl disable firewalld
- chkconfig iptables off
重启防火墙
- systemctl enable firewalld
- service iptables restart
开启防护墙
- systemctl start firewalld
查看所有打开的端口:firewall-cmd --zone=public --list-ports
查看当前所有tcp端口:netstat -ntlp
开放端口永久生效:firewall-cmd --zone=public --add-port=80/tcp --permanent
linux 防火墙启动命令
最新推荐文章于 2024-08-05 14:51:34 发布