Bug 16300 - iptables in core-image-full-cmdline doesn't work
Summary: iptables in core-image-full-cmdline doesn't work
Status: NEW
Alias: None
Product: OE-Core
Classification: Build System, Metadata & Runtime
Component: oe-core other (show other bugs)
Version: 6.0.1
Hardware: x86 x86_64
: Medium+ normal
Target Milestone: 6.1
Assignee: Randy MacLeod
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2026-05-31 07:08 UTC by Henrik Lindström
Modified: 2026-07-16 15:54 UTC (History)
3 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: No (bug/feature does not impact docs)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Henrik Lindström 2026-05-31 07:08:42 UTC
I built core-image-full-cmdline with poky 6.0.1 as distro and qemux86-64 as machine. After booting and logging in as root, running the simple command "iptables -A INPUT -i lo -j ACCEPT" fails with error "modprobe: FATAL: Module ip_tables not found in directory /lib/modules/6.18.24-yocto-standard".

One solution/workaround i found is to enable CONFIG_NETFILTER_XTABLES_LEGACY.
Comment 1 Randy MacLeod 2026-06-04 14:37:20 UTC
Randy to find a person to work on this.
Paul is available for consult as needed.
Comment 2 Paul Barker 2026-06-04 15:56:57 UTC
@Henrik, does it work with the default kernel config if you add `PACKAGECONFIG += "libnftnl"` for iptables? That will require the meta-networking layer.

If that works, we may want to bring libnftnl into OE-core and enable that by default going forward.
Comment 3 Paul Barker 2026-06-04 15:59:05 UTC
Moving this to needinfo.
Comment 4 Henrik Lindström 2026-06-06 08:54:38 UTC
Adding meta-networking and libnftnl to iptables PACKAGECONFIG does indeed work.

I did notice a quirk though, that it only works as long as the "ptest" distro feature is enabled. If i add `DISTRO_FEATURES_OPTED_OUT += "ptest"` to local.conf both iptables and nft stop working. Further adding `KERNEL_EXTRA_FEATURES:append = " features/nf_tables/nf_tables.scc"` to local.conf made it work again.
Comment 5 Randy MacLeod 2026-06-11 15:11:16 UTC
This may be design intent in how the nftables cfg work was done. 
I'll have someone investigate.