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!
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 and in support like you ).
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 !