-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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] tun 模式会响应任何icmp请求报文,即使目标地址不可达。 #1698
Labels
Comments
Skyxim
added
enhancement
New feature or request
and removed
bug
Something isn't working
labels
Dec 5, 2024
这个问题会导致工作场景下,无法正常进行网络诊断操作(ping,路由追踪等),每天需要频繁开启关闭tun,而关闭tun又会导致经过tun的tcp连接被中断。工作场景下的堡垒机、vpn等网络连接均被断开。 |
tun:
enable: true
dns-hijack:
- any:53
stack: mixed
auto-route: true
auto-redir: true
route-address: [
"198.18.0.0/15",
"fc00::/18",
# telegram ip
"91.108.56.0/22",
"91.108.4.0/22",
"91.108.8.0/22",
"91.108.16.0/22",
"91.108.12.0/22",
"149.154.160.0/20",
"91.105.192.0/23",
"91.108.20.0/22",
"185.76.151.0/24",
"2001:b28:f23d::/48",
"2001:b28:f23f::/48",
"2001:67c:4e8::/48",
"2001:b28:f23c::/48",
"2a0a:f280::/32",
]
auto-detect-interface: true
dns:
enable: true
listen: 0.0.0.0:8853
ipv6: true
# fake-ip 优先级高
enhanced-mode: fake-ip
fake-ip-range: 198.18.0.0/15
fake-ip-filter-mode: blacklist
fake-ip-filter:
- rule-set:domestic_non_ip
- rule-set:rule-self-oversea
- rule-set:rule-self
- geosite:cn
- geosite:private
- "*.lan"
- "+.internal"
- "+.in-addr.arpa"
- "+.ip6.arpa"
- rule-set:domestic_non_ip
- rule-set:direct_non_ip
- rule-set:fake-ip
- +.ts.net # tailscale |
fake-ip 模式 + route-address 指令确实可以在某种程度上解决我的需求,多谢提醒。 |
但是在我的使用场景中,由于设置了route-address指令,不存在默认路由了,也就无法劫持虚拟机流量的dns请求。 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
验证步骤
操作系统
Windows
系统版本
windows 11 23H2 内部版本 22631.4037
Mihomo 版本
Mihomo Meta v1.18.10 windows amd64 with go1.23.2 Sun Nov 3 09:22:18 UTC 2024
配置文件
描述
现象:向任何一个地址发送icmp请求,都会收到响应,并且响应时间为1ms
诉求1:当目标地址不可达时,不响应icmp。
诉求2:得到真实的icmp响应时间,而不是1ms。
重现方式
启动tun模式之前,对一个不存在的内网地址发送icmp请求。无法收到icmp响应是符合预期的,因为目标地址本就不存在。
启动tun模式,确保路由规则可以将数据路由到tun设备。对一个不存在的内网地址发送icmp请求会收到响应,并且响应时间为1ms。
日志
No response
The text was updated successfully, but these errors were encountered: