bash - Iptables v1.6.1 无法初始化 iptables 表 `filter' Ubuntu 18.04 Bash Windows

标签 bash ubuntu filter firewall iptables

我正在从 Windows Bash 运行 Ubuntu 18.04:

uname -a
Linux DESKTOP-M87DGAS 4.4.0-17134-Microsoft #112-Microsoft Thu Jun 07 22:57:00 PST 2018 x86_64 x86_64 x86_64 GNU/Linux

我需要打开一些端口:

sudo ufw allow 22/tcp

但是我得到以下错误:

ERROR: initcaps
[Errno 2] iptables v1.6.1: can't initialize iptables table `filter': Table does not exist (do you need to insmod?)
Perhaps iptables or your kernel needs to be upgraded.

我输入同样的错误:

iptables -L

我已经升级了我的内核:

sudo apt-get update
sudo apt-get full-upgrade

我试过重启系统,但没有成功。

如何启动 iptable 过滤器?

最佳答案

根据 github.com 上的 Microsoft WSL 页面,不支持 iptables。

https://github.com/Microsoft/WSL/issues/767

有一个用于请求支持的用户语音页面

https://wpdev.uservoice.com/forums/266908-command-prompt-console-bash-on-ubuntu-on-windo/suggestions/32025199-support-iptables

关于bash - Iptables v1.6.1 无法初始化 iptables 表 `filter' Ubuntu 18.04 Bash Windows,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50946618/

相关文章:

linux - 下载所有网页的Shell脚本?

linux - 我如何检查该平台是 ubuntu 上的笔记本电脑还是台式机?

javascript - 如何使用数组和 JQuery 创建可过滤菜单?

ruby - 安装 Ruby Bash

bash - 在 bash 中调用自定义函数导致 "Command not found"

linux - 如果我使用ubuntu + Windows,如何从未分配的分区增加ubuntu中主目录的磁盘大小?

MongoDB Pymongo Ubuntu - 时间问题

swift - 将对象(自身)传递给扩展

android - 使用 edittext 和自定义适配器过滤 Json Listview

linux - Unix 切割基于列中的顺序