Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] iptables/nftable 规则失效 #645

Closed
3 tasks done
boin opened this issue May 26, 2024 · 6 comments
Closed
3 tasks done

[Bug] iptables/nftable 规则失效 #645

boin opened this issue May 26, 2024 · 6 comments

Comments

@boin
Copy link

boin commented May 26, 2024

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之前没有问题,安装完以后,这条规则就不生效了

@juewuy
Copy link
Owner

juewuy commented May 26, 2024

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

@boin
Copy link
Author

boin commented May 26, 2024

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

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

@juewuy
Copy link
Owner

juewuy commented May 26, 2024

@boin 当然

@boin
Copy link
Author

boin commented May 26, 2024

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

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

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

image

@boin
Copy link
Author

boin commented May 26, 2024

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

fw4里的描述终于对了…

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

image

@boin
Copy link
Author

boin commented May 26, 2024

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

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

@juewuy juewuy closed this as completed Jun 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants