Alpine: problem running iptables

I am using Alpine 3.17. And I installed ufw:

sudo apk add ufw

Then, I write this:

sudo ufw status

However, I get this:

ERROR: problem running iptables: modprobe: FATAL: Module ip_tables not found in directory /lib/modules/5.15.93-0-virt
iptables v1.8.8 (legacy): can't initialize iptables table `filter': Table does not exist (do you need to insmod?)
Perhaps iptables or your kernel needs to be upgraded.

How can I upgrade kernel or iptables in Alpine?

1 Reply

The kernel should automatically be upgraded with your Alpine Linux version. Have you checked to see if iptables and ip6tables are installed? Though ufw might be installed, perhaps one or both of them aren't installed.

See the article on ufw which instructs the installation of ip6tables and ufw. If either one of those don't work, rebooting may help.

Blake

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct