Closed BQvQB closed 6 months ago
请确认你已经正确地安装了依赖, 如同 README 中描述的那样。 https://github.com/apernet/OpenGFW/blob/master/README.zh.md#openwrt
如果你的机器上有 nft 这个命令, 请安装 kmod-nft-queue kmod-nf-conntrack-netlink
,
否则, 请安装 kmod-ipt-nfqueue iptables-mod-nfqueue kmod-nf-conntrack-netlink
。
请确认你已经正确地安装了依赖, 如同 README 中描述的那样。 https://github.com/apernet/OpenGFW/blob/master/README.zh.md#openwrt
如果你的机器上有 nft 这个命令, 请安装
kmod-nft-queue kmod-nf-conntrack-netlink
, 否则, 请安装kmod-ipt-nfqueue iptables-mod-nfqueue kmod-nf-conntrack-netlink
。
![Uploading 123.png…]()
请确认你已经正确地安装了依赖, 如同 README 中描述的那样。 https://github.com/apernet/OpenGFW/blob/master/README.zh.md#openwrt
如果你的机器上有 nft 这个命令, 请安装
kmod-nft-queue kmod-nf-conntrack-netlink
, 否则, 请安装kmod-ipt-nfqueue iptables-mod-nfqueue kmod-nf-conntrack-netlink
。
我确实正确安装了依赖,这个版本的openwrt使用的是iptables,我通过您提供的解决方案又尝试了遍,但是这个问题还是没办法解决。
请确认你已经正确地安装了依赖, 如同 README 中描述的那样。 https://github.com/apernet/OpenGFW/blob/master/README.zh.md#openwrt 如果你的机器上有 nft 这个命令, 请安装
kmod-nft-queue kmod-nf-conntrack-netlink
, 否则, 请安装kmod-ipt-nfqueue iptables-mod-nfqueue kmod-nf-conntrack-netlink
。我确实正确安装了依赖,这个版本的openwrt使用的是iptables,我通过您提供的解决方案又尝试了遍,但是这个问题还是没办法解决。
我重启设备后,设备再次无法开机,又要重置,头大,我已经尝试好多遍,奈何对内核理解不够,我想我自己无法解决这个问题了。
我感觉这个版本的系统有点问题。。
我下载了一个和你同版本的 istoreos-22.03.5-2023122916-x86-64-squashfs-combined.img.gz
, 用 qemu 起了, 给了 4GB 内存, 然而即使只是执行 opkg install kmod-ipt-nfqueue iptables-mod-nfqueue kmod-nf-conntrack-netlink
也会重启。
在载入之后, nfnetlink_queue
这个模块就触发了空指针导致 kernel panic, 我认为这就是你重启之后无法开机的原因。
我又下载了官网上最新的 istoreos-22.03.6-2024031514-x86-64-squashfs-combined.img.gz
, 无此问题, 然而 OpenGFW 仍然无法正常工作。
在简单地审视了 iptables 规则之后, 我发现了一些问题。。
filter
表的 FORWARD
链, 预设规则如下
-A FORWARD -m comment --comment "!fw3: Custom forwarding rule chain" -j forwarding_rule
-A FORWARD -m conntrack --ctstate RELATED,ESTABLISHED -m comment --comment "!fw3" -j ACCEPT
-A FORWARD -i br-lan -m comment --comment "!fw3" -j zone_lan_forward
-A FORWARD -i eth0 -m comment --comment "!fw3" -j zone_wan_forward
-A FORWARD -i docker0 -m comment --comment "!fw3" -j zone_docker_forward
-A FORWARD -m comment --comment "!fw3" -j reject
-A FORWARD -m connmark --mark 0x3e9 -j ACCEPT
-A FORWARD -m connmark --mark 0x3ea -j DROP
-A FORWARD -j NFQUEUE --queue-num 100 --queue-bypass
考虑到 OpenGFW 主要针对局域网流量, 匹配其中 -i br-lan
规则, 对应的 zone_lan_forward
是
-A zone_lan_forward -m comment --comment "!fw3: Custom lan forwarding rule chain" -j forwarding_lan_rule
-A zone_lan_forward -m comment --comment "!fw3: Zone lan to wan forwarding policy" -j zone_wan_dest_ACCEPT
-A zone_lan_forward -m comment --comment "!fw3: Zone lan to docker forwarding policy" -j zone_docker_dest_ACCEPT
-A zone_lan_forward -m conntrack --ctstate DNAT -m comment --comment "!fw3: Accept port forwards" -j ACCEPT
-A zone_lan_forward -m comment --comment "!fw3" -j zone_lan_dest_ACCEPT
最终的 zone_lan_dest_ACCEPT
是
-A zone_lan_dest_ACCEPT -o br-lan -m comment --comment "!fw3" -j ACCEPT
这实际上短路了 OpenGFW 添加的 NFQUEUE 规则, 因此流量不会被 OpenGFW 处理。
为了解决这个问题, 我认为可以安装 nftables。 在存在 nftables 的情况下, OpenGFW 会优先使用 nftables 来设置 NFQUEUE。 而 nftables 和 iptables 是链状处理关系, 也就是说其中一个的 accept 会继续将包交给另一个进行处理, 不会被短路掉。
我进行了一些测试, 在 istoreos-22.03.6-2024031514-x86-64-squashfs-combined.img.gz
上, 先安装以下包
opkg install nftables kmod-nft-queue kmod-nf-conntrack-netlink
然后启动 OpenGFW, 就能看到已经工作正常了。
综上所述, 以下是为了解决你遇到的问题, 提出的建议:
istoreos-22.03.6-2024031514
, 你可以去 iStoreOS 官方提供的下载点进行下载(x86-64, x86-64-efi)。opkg install nftables kmod-nft-queue kmod-nf-conntrack-netlink
。Awesome, you are awesome! Thank you for your answer. It is indeed available now. This is the cause of the problem you mentioned.
综上所述, 以下是为了解决你遇到的问题, 提出的建议:
- 升级 iStoreOS 到
istoreos-22.03.6-2024031514
, 你可以去 iStoreOS 官方提供的下载点进行下载(x86-64, x86-64-efi)。- 执行这条命令来安装包
opkg install nftables kmod-nft-queue kmod-nf-conntrack-netlink
。- 部署并测试 OpenGFW。
Awesome, you are awesome! Thank you for your answer. It is indeed available now. This is the cause of the problem you mentioned.
我使用了本地编译、直接下载你们最新的可执行文件,但是运行之后出现了以下错误(如图所示),之后使用了poweroff命令关闭软路由系统,准备再次进入软路由系统时,却无法进入(无法正常开机)。