debian11使用ufw status报错

debian11使用ufw防火墙时报

ERROR: problem running iptables: # Warning: iptables-legacy tables present, use iptables-legacy to see them
iptables v1.8.7 (nf_tables): Could not fetch rule set generation id: Invalid argument

删除了 ufw 和 iptables,然后先安装 iptables,然后更改为 iptables-legacy。
之后安装ufw,ufw 似乎只适用于 iptables-legacy。

apt purge ufw iptables
apt install iptables
update-alternatives --set iptables /usr/sbin/iptables-legacy
update-alternatives --set ip6tables /usr/sbin/ip6tables-legacy
apt install ufw

可参考
https://tinker-board.asus.com/forum/index.php?/topic/14844-linux-firewall-not-working-tinker-board-2-debian-10-v200/

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容