Issue trying to add ufw rule

pve n00b

Active Member
Oct 21, 2017
12
1
43
58
Hi!
I tried to install the ufw rule

Code:
sudo ufw allow 'Nginx Full'

which returned the following error:

Code:
ERROR: initcaps
[Errno 2] modprobe: ERROR: ../libkmod/libkmod.c:586 kmod_search_moddep() could not open moddep file '/lib/modules/4.15.18-24-pve/modules.dep.bin'
modprobe: FATAL: Module ip6_tables not found in directory /lib/modules/4.15.18-24-pve
ip6tables v1.6.1: can't initialize ip6tables table `filter': Table does not exist (do you need to insmod?)
Perhaps ip6tables or your kernel needs to be upgraded.

Can anyone help me to solve this error?

Thanks!

GuestOS: Ubuntu 18.04
 
Hi.

I guess that this is inside a Container, as it the message mentions our kernel :)

A CT shares the host kernel, and for security reasons it is not allowed to just load new kernel modules.
You need to "pre-load" those modules first on the Host, e.g.:

modprobe ip6table_filter

Once you found all relevant modules this CT with ufw requires you can add it to ".conf" file insided the PVE hosts /etc/modules-load.d/, those modules will be automatically loaded on boot, even if there is no apparent user.
 
Thanks! I'll give it a try. Unfortunately, I am busy with some other stuff, so I cant test this thing out within the next time.