- 查看防火墙状态
systemctl status firewalld
- 开启防火墙
systemctl start firewalld
- 关闭防火墙
systemctl stop firewalld
- 查看当前firewall状态
firewall-cmd --state
- 重启firewall
firewall-cmd --reload
- 禁止开机启动
systemctl disable firewalld.service
- 查看已经开放的端口
firewall-cmd --list-ports
- 开启端口
firewall-cmd --zone=public --add-port=80/tcp --permanent
- 测试端口 window下
telnet 服务器ip 端口
网友评论