无法加载 iptables

无法加载 iptables

我正在尝试为 UFW 安装 iptables,但遇到了问题。

以下是我安装 iptables 的方法:

agganu@agganuserver:~$ sudo apt-get install iptables
Reading package lists... Done
Building dependency tree
Reading state information... Done
iptables is already the newest version (1.8.4-3ubuntu2).
The following packages were automatically installed and are no longer required:
  augeas-lenses libaugeas0 libfwupdplugin1 python3-acme python3-augeas python3-certbot python3-configargparse python3-icu python3-josepy python3-mock python3-parsedatetime python3-pbr
  python3-requests-toolbelt python3-rfc3339 python3-zope.component python3-zope.event python3-zope.hookable
Use 'sudo apt autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 93 not upgraded.

如您所见,我收到 iptables 已安装的消息。

但是当我检查当前 iptables 的状态时,我收到一个错误。

agganu@agganuserver:~$ sudo iptables -L -v
modprobe: FATAL: Module ip_tables not found in directory /lib/modules/5.4.0-96-generic
iptables v1.8.4 (legacy): can't initialize iptables table `filter': Table does not exist (do you need to insmod?)
Perhaps iptables or your kernel needs to be upgraded.

您能告诉我如何解决这个问题,以便我可以安装 UFW 吗?

这是我的系统信息:

            .-/+oossssoo+/-.               agganu@agganuserver
        `:+ssssssssssssssssss+:`           -------------------
      -+ssssssssssssssssssyyssss+-         OS: Ubuntu 20.04.4 LTS x86_64
    .ossssssssssssssssssdMMMNysssso.       Host: Super Server 0123456789
   /ssssssssssshdmmNNmmyNMMMMhssssss/      Kernel: 5.4.0-96-generic
  +ssssssssshmydMMMMMMMNddddyssssssss+     Uptime: 11 days, 3 hours, 26 mins
 /sssssssshNMMMyhhyyyyhmNMMMNhssssssss/    Packages: 1093 (dpkg), 10 (snap)
.ssssssssdMMMNhsssssssssshNMMMdssssssss.   Shell: bash 5.0.17
+sssshhhyNMMNyssssssssssssyNMMMysssssss+   Resolution: 5440x2160
ossyNMMMNyMMhsssssssssssssshmmmhssssssso   Theme: Adwaita [GTK3]
ossyNMMMNyMMhsssssssssssssshmmmhssssssso   Icons: Adwaita [GTK3]
+sssshhhyNMMNyssssssssssssyNMMMysssssss+   Terminal: /dev/pts/0
.ssssssssdMMMNhsssssssssshNMMMdssssssss.   CPU: Intel Xeon D-1521 (8) @ 2.700GHz
 /sssssssshNMMMyhhyyyyhdNMMMNhssssssss/    GPU: 0a:00.0 ASPEED Technology, Inc. ASPEED Graphics Family
  +sssssssssdmydMMMMMMMMddddyssssssss+     Memory: 1141MiB / 32008MiB
   /ssssssssssshdmNNNNmyNMMMMhssssss/
    .ossssssssssssssssssdMMMNysssso.
      -+sssssssssssssssssyyyssss+-
        `:+ssssssssssssssssss+:`
            .-/+oossssoo+/-.

任何帮助是极大的赞赏。

谢谢

相关内容