Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

iptables-nft not supported in arm64 arch alpine #318

Closed
AndyEWang opened this issue Apr 19, 2023 · 2 comments
Closed

iptables-nft not supported in arm64 arch alpine #318

AndyEWang opened this issue Apr 19, 2023 · 2 comments

Comments

@AndyEWang
Copy link

After installing iptables, running cmd /sbin/iptables-nft shows "iptables: Failed to initialize nft: Protocol not supported".
apk add ca-certificates bash libc6-compat iptables ip6tables

docker image tag: alpine:3.17 and alpine:3.17.3

/ # /sbin/iptables-nft --version
iptables: Failed to initialize nft: Protocol not supported
/ # ldd /sbin/iptables-nft
        /lib/ld-musl-aarch64.so.1 (0x5500000000)
        libmnl.so.0 => /usr/lib/libmnl.so.0 (0x550195a000)
        libnftnl.so.11 => /usr/lib/libnftnl.so.11 (0x550197b000)
        libxtables.so.12 => /usr/lib/libxtables.so.12 (0x55019bc000)
        libc.musl-aarch64.so.1 => /lib/ld-musl-aarch64.so.1 (0x5500000000)
/ # uname -a
Linux 3fa10d38f4ef 3.10.0-1127.el7.x86_64 #1 SMP Tue Mar 31 23:36:51 UTC 2020 aarch64 Linux
/ # ls -l /sbin/iptables-nft
lrwxrwxrwx    1 root     root            17 Apr 19 06:55 /sbin/iptables-nft -> xtables-nft-multi
/ #
@ncopa
Copy link
Contributor

ncopa commented Jun 5, 2023

iptables: Failed to initialize nft: Protocol not supported

This is the error message from kernel.

Linux 3fa10d38f4ef 3.10.0-1127.el7.x86_64 #1 SMP Tue Mar 31 23:36:51 UTC 2020 aarch64 Linux

A 3.10 kernel.

Accoring wikipedia nftables was introduced in kernel 3.13.

This is a problem in the kernel and not something we can fix in the alpine docker image.

@ncopa ncopa closed this as completed Jun 5, 2023
@AndyEWang
Copy link
Author

But it works in alpine linux/amd64.

/ # uname -a
Linux beb9c0288e79 3.10.0-1127.el7.x86_64 #1 SMP Tue Mar 31 23:36:51 UTC 2020 x86_64 Linux

/ # /sbin/iptables-nft --version
iptables v1.8.7 (nf_tables)

Maybe qemu-user-static doesn't support it and I also open an issue multiarch/qemu-user-static#191

Hope to get any clues from either alpine or qemu-user-static side.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants