Firefly开源社区

标题: 配置UFW时提示`Module ip6_tables not found` [打印本页]

作者: LCode    时间: 2022-9-27 23:50
标题: 配置UFW时提示`Module ip6_tables not found`
问题和复现步骤:
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

谢谢~
tchip_askquestions

ufw-allow-failed.zip

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


作者: Liuth    时间: 2022-9-28 09:36
需要在内核里开启 ip tables 相关选项
https://wiki.t-firefly.com/Core- ... tml#kernel-shi-yong
这个是356x的维基,但3399同理的
作者: LCode    时间: 2022-10-3 19:01
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存储。

继续研究中~


作者: Liuth    时间: 2022-10-9 09:11
编译完整固件然后烧录到sd卡
作者: LCode    时间: 2022-11-10 10:57
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` 则会输出多个错误后,直接让系统挂掉。

(保持跟进...)
作者: LCode    时间: 2022-11-10 11:02
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:~#

```




欢迎光临 Firefly开源社区 (https://dev.t-firefly.com/) Powered by Discuz! X3.1