iptables v1.6.1 无法初始化 iptables table `filter' Ubuntu 18.04 Bash Windows

Iptables v1.6.1 can't initialize iptables table `filter' Ubuntu 18.04 Bash Windows

我是 运行 Ubuntu 18.04 来自 Windows Bash:

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