Thursday, October 27, 2022

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

Issue

I'm running Ubuntu 18.04 from 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

I need to open some port with:

sudo ufw allow 22/tcp

But I get the following error:

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.

I get the same error by typing:

iptables -L

I've already upgrade my kernel with:

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

I've tried to reboot the system but it didn't work.

How can I initiate the iptable filter?


Solution

According to the Microsoft WSL page on github.com, iptables isn't supported.

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

There is a uservoice page for requesting support at

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



Answered By - Jon
Answer Checked By - David Goodson (WPSolving Volunteer)