windows-subsystem-for-linux - 为什么不能在 wsl2 上启动 ufw?

标签 windows-subsystem-for-linux wsl-2 ufw

我遇到此错误。我花了几天时间试图解决这个问题,但找不到答案,如果有人发生类似的事情,我将不胜感激您的帮助。

错误:运行 ufw-init 时出现问题 iptables-restore v1.8.4(旧版):无法加载匹配“limit”:没有这样的文件或目录

第 63 行发生错误 试试iptables-restore -h' or 'iptables-restore --help' for more information. iptables-restore v1.8.4 (legacy): Couldn't load match limit':没有这样的文件或目录

第 8 行发生错误 尝试“iptables-restore -h”或“iptables-restore --help”以获取更多信息。

运行“/etc/ufw/before.rules”时出现问题 运行“/etc/ufw/user.rules”时出现问题

ERROR: problem running ufw-init

最佳答案

向 wsl2 添加防火墙可能不是很有用,因为您可以使用简单的命令“wsl -u root”获得 wsl2 的 root 访问权限。

查看此 ( https://superuser.com/a/1626513 ) 帖子以了解更多详细信息。

关于windows-subsystem-for-linux - 为什么不能在 wsl2 上启动 ufw?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/66753609/

相关文章:

r - 有没有一种简单的方法可以使用 Windows 10 在 R Markdown 上运行 bash 脚本?

windows - 是否可以在没有 Microsoft Store 的情况下在 Windows 10 WSL 中安装 Ubuntu?

wsl-2 - 无法使用手机上的 Expo Go 连接到 WSL2 上的 Expo React Native 项目

linux - 如何只允许 samba 通过 vpn 隧道?

kubernetes - 如何让CoreDNS在我的Raspberry Pi Kubernetes群集上解析?

hadoop - 重试连接到服务器:hadoopmaster/IP:9000

visual-studio-code - 我无法在 Win Subsystem for Linux 的 Visual Studio Code 中创建文件或目录

c++ - dbg 无法使用 WSL2 处理 VScode - 无法解析不存在的文件 'vscode-remote://wsl+ubuntu-20.04..'

windows - 连接 ECONNREFUSED 127.0.0.1 :27017 Mongo in Docker + WSL version 2

ubuntu - bpftrace 单行命令在 wsl ubuntu 中不起作用