[solved] Nftable and initial install

On a nearly fresh install, installing “ufw” and enabling it throw error. This is due to the “nftable” problem… and this is well documented, thanks. What I found is to run those two commands:

$ update-alternatives --set iptables /usr/sbin/iptables-legacy
$ update-alternatives --set ip6tables /usr/sbin/ip6tables-legacy

It works great!

My suggestion:

I suggest that those two commands to be run in the initial image of osmc. That would help the system to be “coherent” from the beginning (and probably reduce frustration in users like me :slight_smile: and in support like you :wink: ).

Other possible implementation:

I don’t know how the image is built, but if it is statically built, it could be fixed by changing following links:

/etc/alternatives/ip6tables → /usr/sbin/ip6tables-legacy
/etc/alternatives/ip6tables-restore → /usr/sbin/ip6tables-legacy-restore
/etc/alternatives/ip6tables-save → /usr/sbin/ip6tables-legacy-save
/etc/alternatives/iptables → /usr/sbin/iptables-legacy
/etc/alternatives/iptables-restore → /usr/sbin/iptables-legacy-restore
/etc/alternatives/iptables-save → /usr/sbin/iptables-legacy-save

Hope to have bought a quick enhancement with minimum work for you guys/girls !

This may interest @sam_nazarko or @dillthedog who I have seen implied in such conversations in related posts:

The root of the problem is/was in the 4.19 kernel build. IMO, the best approach is therefore to fix the kernel, rather than apply temporary workarounds that will need to be undone later on.

The good news is that the fix is in the forthcoming 5.10 kernel.

Indeed – this is fixed in the 5.10 kernel and is available in Kodi v19 test builds.

We anticipate releasing Kodi v19 imminently.


That’s great news !
Thanks for this solution, which is good for me.

Hope this thread will help other that get the problem with current version…