Firefly开源社区

打印 上一主题 下一主题

[Linux] 配置UFW时提示`Module ip6_tables not found`

42

积分

0

威望

0

贡献

技术小白

积分
42

配置UFW时提示`Module ip6_tables not found`

发表于 2022-9-27 23:50:09      浏览:2989 | 回复:5        打印      只看该作者   [复制链接] 楼主
问题描述及复现步骤:
问题和复现步骤:
1. 烧录固件到SD卡
2. `sudo apt install ufw -y && sudo ufw default allow`后,执行`sudo ufw allow ssh` 会提示如下:


  1. <div>firefly@firefly:~$ sudo ufw allow http</div><div>ERROR: initcaps</div><div>[Errno 2] modprobe: FATAL: Module ip6_tables not found in directory /lib/modules/4.4.194+</div><div>ip6tables v1.8.4 (legacy): can't initialize ip6tables table `filter': Table does not exist (do you need to insmod?)</div><div>Perhaps ip6tables or your kernel needs to be upgraded.</div>
复制代码



请问有人遇到这个问题么,如何解决的?

在其他的如下固件中,也遇到了该问题:

- ROC-RK3399-PC_Ubuntu20.04-Minimal-r21156_v2.5.1b_220528
- ROC-RK3399-PC_Ubuntu18.04-Minimal-r21156_v2.5.1b_220528
- ROC-RK3399-PC_Ubuntu18.04-r21156_v2.5.1b_220528

谢谢~

ufw-allow-failed.zip

1.31 KB, 下载次数: 2, 下载积分: 灯泡 -1 , 经验 -1

回复

使用道具 举报

2077

积分

10

威望

12

贡献

中级创客

Rank: 4

积分
2077
发表于 2022-9-28 09:36:51        只看该作者  沙发
需要在内核里开启 ip tables 相关选项
https://wiki.t-firefly.com/Core- ... tml#kernel-shi-yong
这个是356x的维基,但3399同理的
回复

使用道具 举报

42

积分

0

威望

0

贡献

技术小白

积分
42
发表于 2022-10-3 19:01:57        只看该作者  板凳
Liuth 发表于 2022-9-28 09:36
需要在内核里开启 ip tables 相关选项
https://wiki.t-firefly.com/Core-3568J/kernel_introduction.html# ...

谢谢~
参照说明,能编译生成 resource.img 和 kernel.img。
看到官方的烧录说明,是用内置eMMC存储才能烧录这两个分区?

有办法编译成.deb文件么? 试过执行 `./build.sh kerneldeb` ,但输出如下:

```bash
firefly@firefly:~/proj$ ./build.sh kerneldeb
processing option: kerneldeb
============Start building kernel deb============
TARGET_ARCH          =arm64
TARGET_KERNEL_CONFIG =firefly_roc-rk3399-pc_defconfig
TARGET_KERNEL_DTS    =rk3399-roc-pc
TARGET_KERNEL_CONFIG_FRAGMENT =
==========================================
/home/firefly/proj
#
# configuration written to .config
#
scripts/kconfig/conf  --silentoldconfig Kconfig
  CHK     include/config/kernel.release
make KBUILD_SRC=
  CHK     include/config/kernel.release
  CHK     include/generated/uapi/linux/version.h
  CHK     include/generated/utsrelease.h
  CHK     scripts/mod/devicetable-offsets.h
  CHK     include/generated/timeconst.h
  CHK     include/generated/bounds.h
  CHK     include/generated/asm-offsets.h
  CALL    scripts/checksyscalls.sh
make[3]: 'include/generated/vdso-offsets.h' is up to date.
  CHK     include/generated/compile.h
  DTC     arch/arm64/boot/dts/rockchip/rk3399-roc-pc-exp.dtb
Error: arch/arm64/boot/dts/rockchip/rk3399-roc-pc-exp.dts:53.1-12 Label or path usb_charge not found
FATAL ERROR: Syntax error parsing input tree
scripts/Makefile.lib:320: recipe for target 'arch/arm64/boot/dts/rockchip/rk3399-roc-pc-exp.dtb' failed
make[4]: *** [arch/arm64/boot/dts/rockchip/rk3399-roc-pc-exp.dtb] Error 1
scripts/Makefile.build:484: recipe for target 'arch/arm64/boot/dts/rockchip' failed
make[3]: *** [arch/arm64/boot/dts/rockchip] Error 2
arch/arm64/Makefile:127: recipe for target 'dtbs' failed
make[2]: *** [dtbs] Error 2
make[2]: *** Waiting for unfinished jobs....
scripts/package/Makefile:96: recipe for target 'bindeb-pkg' failed
make[1]: *** [bindeb-pkg] Error 2
Makefile:1324: recipe for target 'bindeb-pkg' failed
make: *** [bindeb-pkg] Error 2
ERROR: Running build_kerneldeb failed!
ERROR: exit code 2 from line 758:
    make ARCH=$RK_ARCH bindeb-pkg RK_KERNEL_DTS=$RK_KERNEL_DTS -j$RK_JOBS
```

这边用的SD卡启动方式,没用到eMMC存储。

继续研究中~

回复

使用道具 举报

2077

积分

10

威望

12

贡献

中级创客

Rank: 4

积分
2077
发表于 2022-10-9 09:11:05        只看该作者  地板
编译完整固件然后烧录到sd卡
回复

使用道具 举报

42

积分

0

威望

0

贡献

技术小白

积分
42
发表于 2022-11-10 10:57:51        只看该作者  5#
Liuth 发表于 2022-10-9 09:11
编译完整固件然后烧录到sd卡

谢谢提醒。

参照:https://wiki.t-firefly.com/zh_CN ... ux_compile_gpt.html,目前能基于docker编译完整固件。默认状态没有问题。尝试修改kernel配置,以支持`IPTables`时,会提示:
```bash
root@firefly:~# ufw allow ssh
ERROR: initcaps
[Errno 2] modprobe: FATAL: Module ip6_tables not found in directory /lib/modules/4.4.194+
ip6tables v1.8.4 (legacy): can't initialize ip6tables table `filter': Table does not exist (do you need to insmod?)
Perhaps ip6tables or your kernel needs to be upgraded.
```
`ufw enable` 则会输出多个错误后,直接让系统挂掉。

(保持跟进...)
回复

使用道具 举报

42

积分

0

威望

0

贡献

技术小白

积分
42
发表于 2022-11-10 11:02:31        只看该作者  6#
Liuth 发表于 2022-10-9 09:11
编译完整固件然后烧录到sd卡

```bash
root@firefly:~# uname -a
Linux firefly 4.4.194+ #1 SMP Thu Nov 10 02:13:30 UTC 2022 aarch64 aarch64 aarch64 GNU/Linux
root@firefly:~#

```
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

友情链接 : 爱板网 电子发烧友论坛 云汉电子社区 粤ICP备14022046号-2
快速回复 返回顶部 返回列表