-
查看防火墙是否开启 (Active: active (running) 是开启状态)
systemctl status firewalld
-
查看端口是否开启(显示yes是开启 no为没有开启)
firewall-cmd --query-port=8080/tcp
-
添加端口(–permanent永久生效,没有此参数重启后失效)
firewall-cmd --add-port=8080/tcp --permanen
-
重启
firewall-cmd --reload
centos 防火墙添加访问端口
猜你喜欢
转载自blog.csdn.net/liuxiaoming1109/article/details/83583838
今日推荐
周排行