juewuy / ShellCrash

Run sing-box/mihomo as client in shell

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[Bug] iptables/nftable 规则失效

boin opened this issue · comments

Verify steps

  • 我已经在 Issue Tracker 中找过我要提出的问题 I have searched on the issue tracker for a related issue.
  • 我已经使用公测版本测试过,问题依旧存在 I have tested using the test mod, and the issue still exists.
  • 我已经仔细看过 常见问题 并无法自行解决问题

Description

我的openwrt 有一条规则是限制小孩看电视的

chain output_wan { # handle 14 ether saddr 04:xx:xx:xx:xx:xx meta hour "21:30"-"23:59:59" meta day { 0, 1, 2, 3, 4 } counter packets 0 bytes 0 jump drop_to_wan comment "!fw4: Block TV" # handle 665 jump accept_to_wan # handle 666 }

chain drop_to_wan { # handle 549 oifname "pppoe-wan" counter packets 0 bytes 0 drop comment "!fw4: drop wan IPv4/IPv6 traffic" # handle 678 }

在安装shellcrash之前没有问题,安装完以后,这条规则就不生效了

@boin 用局域网过滤过滤掉相关设备

@boin 用局域网过滤过滤掉相关设备

收到。还有一个问题就是,过滤后这台电视上的魔法就消失了,对吗?

@boin 当然

发现了一个有趣的现象,我添加电视的Mac到黑名单中,然后重启服务。发现在控制面板中只有电视的流量了…

-----------------------------------------------
请在此添加或移除设备
当前过滤方式为:黑名单模式
仅列表内设备流量不经过内核
-----------------------------------------------
当前已过滤设备为:
   设备IP       设备mac地址       设备名称
000.000.00.00 04:5d:xx:xx:xx:22 未知设备
-----------------------------------------------
 1 切换为白名单模式
 2 添加指定设备
 3 移除指定设备
 4 清空整个列表
 0 返回上级菜单

上面这个未知设备 就是 下面的 192.168.1.128

image

这个问题在我手工切成白名单,然后又切回黑名单以后,消失了。

fw4里的描述终于对了…

看起来这个规则里的 是/不是 混乱了。

image

我记得我的老路由——ubnt的er4——用的是1.8版本,自定义的这条iptables是生效的。升级到1.9就失效了。是因为1.9改了实现吗?

老路由是混合模式/Redir;新路由是pve虚拟机的openwrt用的是nft混合模式(1.9.0稳定版)