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] 当其他DNS服务器的解析请求转发到mosdns上之后,无法得到解析回复 #769

Open
4 tasks done
ITfenglin opened this issue Nov 28, 2023 · 1 comment

Comments

@ITfenglin
Copy link

在提交之前,请确认

  • 我已经尝试搜索过 Issue ,但没有找到相关问题。
  • 我正在使用最新的 mosdns 版本(或者最新的 commit),问题依旧存在。
  • 我仔细看过 wiki 后仍然无法自行解决该问题。
  • 我非常确定这是 mosdns 核心的问题。(如果是通过第三方衍生软件使用 mosdns 核心,不确定问题源头时,请先向衍生软件开发者提交问题。)

mosdns 版本

MosDNS v5.3.1

操作系统

openwrt

Bug 描述和复现步骤

我在测试使用mosdns来给公司的办公电脑做国内国外的DNS分流解析,
把mosdns安装在openwrt软路由中,然后客户端电脑的DNS指向openwrt,openwrt中的dnsmasq的DNS转发指向mosdns 127.0.0.1#5335,客户端上网解析一切正常,也能实现分流的效果。但因是在公司里面使用,所以客户端电脑的DNS必须要指向域控制器的DNS,然后域控制器上配置DNS转发到dnsmasq上,dnsmasq的DNS再转发mosdns上实现解析与分流,这时候问题来了,客户端电脑无法打开网页,提示DNS_PROBE_FINISHED_NXDOMAIN.

如果我将客户端电脑DNS直接指向openwrt中的dnsmasq,而不使用域控DNS转发,客户端上网解析一切正常,也能实现分流的效果,
如果dnsmasq的转发地址不指向 127.0.0.1#5335,而是指向公共DNS地址 例如223.5.5.5. 那么客户端DNS指向域控制器,再通过域控制器DNS转发到dnsmasq上,也能打开网页,只是没有分流功能。
再如果域控制器的DNS直接转发到公共DNS 223.5.5.5 也能正常上网,
但是将 客户端电脑的DNS必须要指向域控制器的DNS,然后域控制器上配置DNS转发到dnsmasq上,dnsmasq的DNS再转发mosdns上实现解析与分流,客户端电脑无法打开网页,提示DNS_PROBE_FINISHED_NXDOMAIN. 国内国外的网站都打不开,或者反应很久才能打开,但网页内容显示不全,无法使用。这个问题已经困扰我好几天了,始终没有找到原因。

使用的配置文件

使用的内置预设配置文件

mosdns 的 log 记录

2023-11-28 14:18:28	INFO	unpacking entry	{"tag": "cn", "length": 10519, "file": "/var/mosdns/geoip_cn.txt"}
2023-11-28 14:18:28	INFO	unpacking entry	{"tag": "cn", "length": 64614, "file": "/var/mosdns/geosite_cn.txt"}
2023-11-28 14:18:28	INFO	unpacking entry	{"tag": "apple", "length": 1735, "file": "/var/mosdns/geosite_apple.txt"}
2023-11-28 14:18:28	INFO	unpacking entry	{"tag": "geolocation-!cn", "length": 19339, "file": "/var/mosdns/geosite_geolocation-!cn.txt"}
2023-11-28 14:18:28	INFO	loading plugin	{"tag": "geosite_cn", "type": "domain_set"}
2023-11-28 14:18:28	INFO	starting api http server	{"addr": "0.0.0.0:9091"}
2023-11-28 14:18:28	INFO	loading plugin	{"tag": "geoip_cn", "type": "ip_set"}
2023-11-28 14:18:28	INFO	loading plugin	{"tag": "geosite_apple", "type": "domain_set"}
2023-11-28 14:18:28	INFO	loading plugin	{"tag": "geosite_no_cn", "type": "domain_set"}
2023-11-28 14:18:28	INFO	loading plugin	{"tag": "whitelist", "type": "domain_set"}
2023-11-28 14:18:28	INFO	loading plugin	{"tag": "blocklist", "type": "domain_set"}
2023-11-28 14:18:28	INFO	loading plugin	{"tag": "greylist", "type": "domain_set"}
2023-11-28 14:18:28	INFO	loading plugin	{"tag": "ddnslist", "type": "domain_set"}
2023-11-28 14:18:28	INFO	loading plugin	{"tag": "hosts", "type": "hosts"}
2023-11-28 14:18:28	INFO	loading plugin	{"tag": "redirect", "type": "redirect"}
2023-11-28 14:18:28	INFO	redirect	redirect rules loaded	{"length": 0}
2023-11-28 14:18:28	INFO	loading plugin	{"tag": "adlist", "type": "domain_set"}
2023-11-28 14:18:28	INFO	loading plugin	{"tag": "local_ptr", "type": "domain_set"}
2023-11-28 14:18:28	INFO	loading plugin	{"tag": "cloudflare_cidr", "type": "ip_set"}
2023-11-28 14:18:28	INFO	loading plugin	{"tag": "lazy_cache", "type": "cache"}
2023-11-28 14:18:28	INFO	loading plugin	{"tag": "forward_xinfeng_udp", "type": "forward"}
2023-11-28 14:18:28	INFO	loading plugin	{"tag": "forward_local", "type": "forward"}
2023-11-28 14:18:28	INFO	loading plugin	{"tag": "forward_remote", "type": "forward"}
2023-11-28 14:18:28	INFO	loading plugin	{"tag": "forward_remote_upstream", "type": "sequence"}
2023-11-28 14:18:28	INFO	loading plugin	{"tag": "modify_ttl", "type": "sequence"}
2023-11-28 14:18:28	INFO	loading plugin	{"tag": "modify_ddns_ttl", "type": "sequence"}
2023-11-28 14:18:28	INFO	loading plugin	{"tag": "has_resp_sequence", "type": "sequence"}
2023-11-28 14:18:28	INFO	loading plugin	{"tag": "query_is_non_local_ip", "type": "sequence"}
2023-11-28 14:18:28	INFO	loading plugin	{"tag": "fallback", "type": "fallback"}
2023-11-28 14:18:28	INFO	loading plugin	{"tag": "apple_domain_fallback", "type": "fallback"}
2023-11-28 14:18:28	INFO	loading plugin	{"tag": "query_is_apple_domain", "type": "sequence"}
2023-11-28 14:18:28	INFO	loading plugin	{"tag": "query_is_ddns_domain", "type": "sequence"}
2023-11-28 14:18:28	INFO	loading plugin	{"tag": "query_is_local_domain", "type": "sequence"}
2023-11-28 14:18:28	INFO	loading plugin	{"tag": "query_is_no_local_domain", "type": "sequence"}
2023-11-28 14:18:28	INFO	loading plugin	{"tag": "query_is_whitelist_domain", "type": "sequence"}
2023-11-28 14:18:28	INFO	loading plugin	{"tag": "query_is_greylist_domain", "type": "sequence"}
2023-11-28 14:18:28	INFO	loading plugin	{"tag": "query_is_reject_domain", "type": "sequence"}
2023-11-28 14:18:28	INFO	loading plugin	{"tag": "main_sequence", "type": "sequence"}
2023-11-28 14:18:28	INFO	loading plugin	{"tag": "udp_server", "type": "udp_server"}
2023-11-28 14:18:28	INFO	udp_server	udp server started	{"addr": "[::]:5335"}
2023-11-28 14:18:28	INFO	loading plugin	{"tag": "tcp_server", "type": "tcp_server"}
2023-11-28 14:18:28	INFO	tcp_server	tcp server started	{"addr": "[::]:5335", "tls": false}
2023-11-28 14:18:28	INFO	all plugins are loaded
@ljcbaby
Copy link

ljcbaby commented Jan 5, 2024

怀疑是dns环了,

另:本项目没有 内置预设配置文件。不是你自己手搓的文件的话,估计就是插件生成的。建议去翻出来贴上去。

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