Adding iptables to image


Using colibri imx6 I want to do ip forwarding. I decided to use iptables for that.
I added the package to my local.conf file
IMAGE_INSTALL:append = " nano tmux htop iptables"

After that trying to run iptables -L returned following error

root@colibri-imx6-11176894:/lib/modules# iptables -L
modprobe: FATAL: Module ip_tables not found in directory /lib/modules/6.1.55-6.4.0-devel+git.d23900f974e0
iptables v1.8.7 (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.

then I started for research I found following link

After the execution of this command

bitbake -c savedefconfig virtual/kernel

I created my own layer my configuration looks like this

spear@spear-Aspire-A515-47:~/batman/layers/meta-oozer/recipes-kernel/linux$ ls
files  linux-toradex-ti_6.1.bbappend
spear@spear-Aspire-A515-47:~/batman/layers/meta-oozer/recipes-kernel/linux$ cat linux-toradex-ti_6.1.bbappend 
SRC_URI += "file://defconfig"
FILESEXTRAPATHS:prepend := "${THISDIR}/files:"

Inside ./files directory there is defconfig file I got as a result of steps that I shared in the link above. I am appending the file.

My problem is these steps couldn’t resolved my problem. I have got same error again.
What could I be missing ?


defconfig (9.5 KB)

Adding Kernel-modules to IMAGE_INSTALL should do the trick.