1.查看防火墙状态
firewall-cmd --state
running代表防火墙正在运行中,如果防火墙处在关闭状态,则运行下面命令开启防火墙
systemctl start firewalld.service
2.查看某个端口是否放行
firewall-cmd --query-port=端口号/tcp
3.放行指定端口
firewall-cmd --zone=public --add-port=8080/tcp --permanent
3.1.重启防火墙
systemctl restart firewalld.service
3.2 重新载入配置
firewall-cmd --reload
标签:--,cmd,端口,防火墙,firewall,放行,Linux
From: https://www.cnblogs.com/RaymonGoGo/p/16782618.html