Ubuntu-重新启动后ufw状态显示为非活动

问题描述

已经为ufw启用了自动重启功能,以前运行良好,但是我无法理解出了什么问题...

用例:

当我检查sudo ufw status时 它显示-> Status: inactive

然后我启用它sudo ufw enable显示-> Command may disrupt existing ssh connections. Proceed with operation (y|n)?我命中了-> y显示-> Firewall is active and enabled on system startup

然后我重新启动sudo reboot 重启后,当我再次检查ufw状态时,它显示为非活动状态。

尝试了以下操作:

  1. 文件lib/systemd/system/uwf.service添加了行After=netfilter-persistent.service

  2. 文件etc/rc.local添加了以下几行:ufw enable exit 0

  3. 文件etc/ufw/ufw.conf中 已启用ENABLED=yes

以前有人遇到过类似的问题吗?

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)