本文内容为网友分享,存在未知的风险性,查阅使用过程请务必认真辨别!
// 1.检验防火墙是否启动
firewall-cmd –state
// 2. 检查8080 端口是否启动:
firewall-cmd –permanent –zone=public –list-ports
//3.开启 8080 端口:
firewall-cmd –zone=public –add-port=8080/tcp –permanent
//4.重新启动防护墙
firewall-cmd –reload
// 5.验证8080 端口是否生效
firewall-cmd –zone=public –query-port=8080/tcp
Centos 7中默认的linux的系统默认防火墙不是iptables,而是firewall,此时应该使用以下方式关闭防火墙了。
//1.关闭防火墙
systemctl stop firewalld.service #停止firewall
systemctl disable firewalld.service #禁止firewall开机启动
![图片[1]-linux关闭防火墙-云村集邮社](https://study.wokewu.cn/wp-content/uploads/2024/10/微信截图_20241018221317.jpg)
© 版权声明
文章版权归作者所有,未经允许请勿转载。
全站免费资源免费下载,请微信扫一扫下载
THE END
暂无评论内容