LXD/iptables on 5B

I have been trying to install Linux Containers (LXD) on my 5B, and have been unable to so far. I have tried four distros (Rock Pi’s Debian and Ubuntu, plus two Armbian 5B builds) but I get the same error in every distro when I run lxd init:

Error: Failed to create local member network “lxdbr0” in project “default”: Failed to setup firewall: Failed to run: iptables -w -t mangle -I POSTROUTING -o lxdbr0 -p udp --dport 68 -j CHECKSUM --checksum-fill -m comment --comment generated for LXD network lxdbr0: exit status 2 (iptables v1.8.4 (legacy): unknown option “–checksum-fill”

LXD is installed via snap, and a search showed the libxt_CHECKSUM.so library has been installed in two places:

/snap/core20/1699/usr/lib/aarch64-linux-gnu/xtables/libxt_CHECKSUM.so

/usr/lib/aarch64-linux-gnu/xtables/libxt_CHECKSUM.so

I tried adding the library to my path but that made no difference.

If anyone can suggest how to fix this, I would appreciate it.

things to try: (source: https://forum.turris.cz/t/bad-udp-cksum-on-packets-from-odhcp6c/11961/10)

This may require the kernel paramater

net.netfilter.nf_conntrack_checksum = 1

and/or modules to be installed

  • iptables-mod-checksum
  • kmod-ipt-checksum

From what I can tell, this module should be built if you are using the stock kernel, but its worth grepping your config.gz and looking for “CHECKSUM” to make sure.

Try: iptables -j CHECKSUM -h ?

1 Like

Thank you, Enthusiast. I regret to say your suggestions did not fix the problem for me, however I find that now LXD is working in the official Ubuntu image and in the latest Armbian image.