1. 查看firewall服务状态
systemctl status firewalld
2.启动/关闭/重启firewall
systemctl start/stop/restart firewalld
3.禁用或者启用firewall
systemctl disable/enable firewalld
4. 查看端口是否开放
firewall-cmd --query-port=8020/tcp
firewall-cmd --query-port=8020/udp
5. 新增开发端口
firewall-cmd --add-port=5000/tcp --permanent
firewall-cmd --add-port=5000/udp --permanent
6. 关于服务:
firewall-cmd --add-service=ftp --permanent
firewall-cmd --remove-service=ftp --permanent
7. 查看firewall状态
firewall-cmd --status
systemctl status firewalld
8. 查看 firewall目前开放的内容
firewall-cmd --list-all
9. 查看开放的端口
firewall-cmd --list-port