22.04 - ufw/ip 表无法获取规则集

Kco*_*ore 3 server iptables firewall ufw 22.04

我正在尝试在运行 Ubuntu 服务器 22.04 的 Raspberry Pi 4 上启动并运行 UFW。但我不知所措。

# via SSH session:
~$ sudo ufw status
ERROR: problem running iptables: iptables v1.8.7 (nf_tables): Could not fetch rule set generation id: Invalid argument

# On screen connected to RPi:
[...] Module has invalid ELF structures
Run Code Online (Sandbox Code Playgroud)

更新并重新启动,但没有任何作用。进行了搜索并尝试使用iptables-legacy,但仍然不起作用...尝试将遗留模块列入黑名单并使用 iptables-nft。

有人有什么想法吗?

小智 5

尝试使用以下命令:

sudo update-alternatives --set iptables /usr/sbin/iptables-legacy
Run Code Online (Sandbox Code Playgroud)