linux配置防火墙iptables失败,firewalld成功

Posted on 2020-04-24 10:32  慢热并不是缺点  阅读(564)  评论(0编辑  收藏  举报

在服务器上配置iptables,开启自己项目使用的接口,然后使用systemctl enable iptables,也配置成功,reboot后

systemctl status iptables,是dead...,cat /etc/sysconfig/iptables,自已开启的端口还在,只是重启服务器后iptables并未启动,

但firewalld的就可以配置成功,同样使用systemctl enable firewalld 就成功了,

firewall-cmd --zone=public --add-port=8080/tcp --permanent 添加端口 并permanent永久生效,重启成功。

reboot,8080端口成功,项目访问成功。

Copyright © 2024 慢热并不是缺点
Powered by .NET 8.0 on Kubernetes