Code Monkey home page Code Monkey logo

Comments (12)

chenmozhijin avatar chenmozhijin commented on September 28, 2024

Turbo ACC通过检测”/lib/modules/内核版本/“中的内核模块决定是否显示对应的设置项。
我看了一下你编译的固件,其中模块都是在的。
我怀疑是有可能是获取内核版本的问题请尝试执行echo -n $(uname -r)看看它返回的内核版本是否与”/lib/modules/”中的一致。
我不了解LXC,但我认为有可能是它导致的。

from openwrt-k.

smdx avatar smdx commented on September 28, 2024

Turbo ACC通过检测”/lib/modules/内核版本/“中的内核模块决定是否显示对应的设置项。 我看了一下你编译的固件,其中模块都是在的。 我怀疑是有可能是获取内核版本的问题请尝试执行echo -n $(uname -r)看看它返回的内核版本是否与”/lib/modules/”中的一致。 我不了解LXC,但我认为有可能是它导致的。

感谢回复,输入命令行查看内核确实是不一致,LXC用的是PVE的内核。请问该如何解决?谢谢
Screenshot-2023-10-12_131448
Screenshot-2023-10-12_131455

from openwrt-k.

chenmozhijin avatar chenmozhijin commented on September 28, 2024

修改opewnrt中的"/usr/lib/lua/luci/model/cbi/turboacc.lua"的第一行

local kernel_version = luci.sys.exec("echo -n $(uname -r)")

改为

local kernel_version = luci.sys.exec("echo -n '5.15.132'")

或改用虚拟机运行openwrt

from openwrt-k.

smdx avatar smdx commented on September 28, 2024

修改opewnrt中的"/usr/lib/lua/luci/model/cbi/turboacc.lua"的第一行

local kernel_version = luci.sys.exec("echo -n $(uname -r)")

改为

local kernel_version = luci.sys.exec("echo -n '5.15.132'")

或改用虚拟机运行openwrt

感谢,刚开始用x86时用虚拟机运行openwrt消耗比较大LXC运行CPU平时占用0.x到2%以下。
在修改后设置项有了,但是开启使用全锥形 NAT 还是显示未运行。

from openwrt-k.

smdx avatar smdx commented on September 28, 2024

修改opewnrt中的"/usr/lib/lua/luci/model/cbi/turboacc.lua"的第一行

local kernel_version = luci.sys.exec("echo -n $(uname -r)")

改为

local kernel_version = luci.sys.exec("echo -n '5.15.132'")

或改用虚拟机运行openwrt

大佬请教一下如何在不编译turboacc插件的情况下在防火墙添加FullCone-NAT功能?谢谢
lede防火墙这种
Screenshot-2023-10-13_201343

from openwrt-k.

chenmozhijin avatar chenmozhijin commented on September 28, 2024

比较麻烦,lede使用firewall3目前openwrt官方源码22.03以后使用firewall4没办法直接移植,FullCone-NAT的实现方法也不同。
turboacc插件只是一个开关真正实现其功能的是它的依赖
不过你可以使用命令进行功能开关

uci set firewall.@defaults[0].flow_offloading="1"
uci set firewall.@defaults[0].flow_offloading_hw="1"
uci set firewall.@defaults[0].fullcone="1"
uci commit firewall
sysctl -w net.ipv4.tcp_congestion_control="bbr"
/etc/init.d/dnsmasq restart
/etc/init.d/firewall restart

uci set firewall.@defaults[0].flow_offloading="0"
uci set firewall.@defaults[0].flow_offloading_hw="0"
uci set firewall.@defaults[0].fullcone="0"
uci commit firewall
sysctl -w net.ipv4.tcp_congestion_control="cubic"
/etc/init.d/dnsmasq restart
/etc/init.d/firewall restart

from openwrt-k.

smdx avatar smdx commented on September 28, 2024

比较麻烦,lede使用firewall3目前openwrt官方源码22.03以后使用firewall4没办法直接移植,FullCone-NAT的实现方法也不同。 turboacc插件只是一个开关真正实现其功能的是它的依赖 不过你可以使用命令进行功能开关 开

uci set firewall.@defaults[0].flow_offloading="1"
uci set firewall.@defaults[0].flow_offloading_hw="1"
uci set firewall.@defaults[0].fullcone="1"
uci commit firewall
sysctl -w net.ipv4.tcp_congestion_control="bbr"
/etc/init.d/dnsmasq restart
/etc/init.d/firewall restart

uci set firewall.@defaults[0].flow_offloading="0"
uci set firewall.@defaults[0].flow_offloading_hw="0"
uci set firewall.@defaults[0].fullcone="0"
uci commit firewall
sysctl -w net.ipv4.tcp_congestion_control="cubic"
/etc/init.d/dnsmasq restart
/etc/init.d/firewall restart

好的,能用fullcone就行。非常感谢

from openwrt-k.

smdx avatar smdx commented on September 28, 2024

比较麻烦,lede使用firewall3目前openwrt官方源码22.03以后使用firewall4没办法直接移植,FullCone-NAT的实现方法也不同。 turboacc插件只是一个开关真正实现其功能的是它的依赖 不过你可以使用命令进行功能开关 开

uci set firewall.@defaults[0].flow_offloading="1"
uci set firewall.@defaults[0].flow_offloading_hw="1"
uci set firewall.@defaults[0].fullcone="1"
uci commit firewall
sysctl -w net.ipv4.tcp_congestion_control="bbr"
/etc/init.d/dnsmasq restart
/etc/init.d/firewall restart

uci set firewall.@defaults[0].flow_offloading="0"
uci set firewall.@defaults[0].flow_offloading_hw="0"
uci set firewall.@defaults[0].fullcone="0"
uci commit firewall
sysctl -w net.ipv4.tcp_congestion_control="cubic"
/etc/init.d/dnsmasq restart
/etc/init.d/firewall restart

大佬请教一下
使用你提供的命令行开启fullcone
uci set firewall.@defaults[0].fullcone="1"
uci commit firewall
/etc/init.d/dnsmasq restart
/etc/init.d/firewall restart

在/etc/init.d/firewall restart返回的信息确认已经开启fullcone了
但是在Turbo ACC里面还是显示未运行,这个是什么原因?谢谢

from openwrt-k.

chenmozhijin avatar chenmozhijin commented on September 28, 2024

Turbo ACC使用cat "/sys/module/nft_fullcone/refcnt"命令检查fullcone的运行状态,如果为返回0则判断fullcone已启用。

我推测这是因为:fullcone的实现依赖于内核模块kmod-nft-fullcone这个模块是已经编译到openwrt的内核中了,但是因为LXC没有运行单独的内核,运行在LXC中的openwrt使用的是宿主机(pve)的内核而其中并没有kmod-nft-fullcone这个模块所以就无法使用了。

不过还是可以用 NatTypeTester 试一它到底有没有用,如果没有用或许只能把openwrt安装到虚拟机中才能解决这个问题

相关链接
关于“/sys/module/”
firewall补丁判断fullcone是否开启的方法
lxc项目存储库

from openwrt-k.

smdx avatar smdx commented on September 28, 2024

Turbo ACC使用cat "/sys/module/nft_fullcone/refcnt"命令检查fullcone的运行状态,如果为返回0则判断fullcone已启用。

我推测这是因为:fullcone的实现依赖于内核模块kmod-nft-fullcone这个模块是已经编译到openwrt的内核中了,但是因为LXC没有运行单独的内核,运行在LXC中的openwrt使用的是宿主机(pve)的内核而其中并没有kmod-nft-fullcone这个模块所以就无法使用了。

不过还是可以用 NatTypeTester 试一它到底有没有用,如果没有用或许只能把openwrt安装到虚拟机中才能解决这个问题

相关链接 关于“/sys/module/” firewall补丁判断fullcone是否开启的方法 lxc项目存储库

使用cat命令查看提示cat: can't open '/sys/module/nft_fullcone/refcnt': No such file or directory
和你说的一样PVE的内核没有kmod-nft-fullcone这个模块。用过NatTypeTester测试显示FullCone没问题
就不细究了。感谢回复。

from openwrt-k.

m0eak avatar m0eak commented on September 28, 2024

比较麻烦,lede使用firewall3目前openwrt官方源码22.03以后使用firewall4没办法直接移植,FullCone-NAT的实现方法也不同。 turboacc插件只是一个开关真正实现其功能的是它的依赖 不过你可以使用命令进行功能开关 开

uci set firewall.@defaults[0].flow_offloading="1"
uci set firewall.@defaults[0].flow_offloading_hw="1"
uci set firewall.@defaults[0].fullcone="1"
uci commit firewall
sysctl -w net.ipv4.tcp_congestion_control="bbr"
/etc/init.d/dnsmasq restart
/etc/init.d/firewall restart

uci set firewall.@defaults[0].flow_offloading="0"
uci set firewall.@defaults[0].flow_offloading_hw="0"
uci set firewall.@defaults[0].fullcone="0"
uci commit firewall
sysctl -w net.ipv4.tcp_congestion_control="cubic"
/etc/init.d/dnsmasq restart
/etc/init.d/firewall restart

大佬请教一下 使用你提供的命令行开启fullcone uci set firewall.@defaults[0].fullcone="1" uci commit firewall /etc/init.d/dnsmasq restart /etc/init.d/firewall restart

在/etc/init.d/firewall restart返回的信息确认已经开启fullcone了 但是在Turbo ACC里面还是显示未运行,这个是什么原因?谢谢

lxc公用宿主机的内核,宿主机内核没有fullcone 模块,那lxc里的op也肯定开启不了

from openwrt-k.

smdx avatar smdx commented on September 28, 2024

pve内核用的是打了fullcone 模块补丁的,不过已经弃用lxc运行op了。

from openwrt-k.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.