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

无法使用1.1.1.1作为DNS #4

Closed
dawncold opened this issue Jun 15, 2018 · 5 comments
Closed

无法使用1.1.1.1作为DNS #4

dawncold opened this issue Jun 15, 2018 · 5 comments

Comments

@dawncold
Copy link

ChinaDNS的upstream servers:202.106.195.68,127.0.0.1:5300
其中127.0.0.1:5300是dns-forwarder

dns-forwarder转发到8.8.8.8时一切正常,用dig不管是使用ChinaDNS还是dns-forwarder查询github.com都正常。

dns-forwarder转发到1.1.1.1时,使用dig可以正常从dns-forwarder查询到github.com,但无法通过ChinaDNS查询到结果,最终导致转发到1.1.1.1时有些网站无法访问,因为解析不了域名。

root@LEDE:~# dig @127.0.0.1 -p 5300 github.com

; <<>> DiG 9.10.4-P5 <<>> @127.0.0.1 -p 5300 github.com
; (1 server found)
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 3030
;; flags: qr rd ra; QUERY: 1, ANSWER: 2, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 1452
;; QUESTION SECTION:
;github.com.			IN	A

;; ANSWER SECTION:
github.com.		28	IN	A	192.30.255.113
github.com.		28	IN	A	192.30.255.112

;; Query time: 346 msec
;; SERVER: 127.0.0.1#5300(127.0.0.1)
;; WHEN: Fri Jun 15 10:31:20 CST 2018
;; MSG SIZE  rcvd: 71

root@LEDE:~# dig @127.0.0.1 -p 5353 github.com

; <<>> DiG 9.10.4-P5 <<>> @127.0.0.1 -p 5353 github.com
; (1 server found)
;; global options: +cmd
;; connection timed out; no servers could be reached

在LEDE上使用tcp和默认方式查询github.com都正常 (DNS: 1.1.1.1)

; <<>> DiG 9.10.4-P5 <<>> @1.1.1.1 github.com +tcp
; (1 server found)
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 51968
;; flags: qr rd ra; QUERY: 1, ANSWER: 2, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 1452
;; QUESTION SECTION:
;github.com.			IN	A

;; ANSWER SECTION:
github.com.		48	IN	A	192.30.255.113
github.com.		48	IN	A	192.30.255.112

;; Query time: 345 msec
;; SERVER: 1.1.1.1#53(1.1.1.1)
;; WHEN: Fri Jun 15 10:28:58 CST 2018
;; MSG SIZE  rcvd: 71

root@LEDE:~# dig @1.1.1.1 github.com

; <<>> DiG 9.10.4-P5 <<>> @1.1.1.1 github.com
; (1 server found)
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 58692
;; flags: qr rd ra; QUERY: 1, ANSWER: 2, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 1452
;; QUESTION SECTION:
;github.com.			IN	A

;; ANSWER SECTION:
github.com.		34	IN	A	192.30.255.113
github.com.		34	IN	A	192.30.255.112

;; Query time: 295 msec
;; SERVER: 1.1.1.1#53(1.1.1.1)
;; WHEN: Fri Jun 15 10:30:13 CST 2018
;; MSG SIZE  rcvd: 71

手动运行ChinaDNS并加了verbose参数,可看到没有dns-forwarder的返回结果(转发到1.1.1.1时)

Fri Jun 15 10:35:39 2018 request github.com from 202.106.195.68:53 127.0.0.1:5300
Fri Jun 15 10:35:39 2018 response github.com from 202.106.195.68:53 - 13.250.177.223, filter
Fri Jun 15 10:35:44 2018 request github.com from 202.106.195.68:53 127.0.0.1:5300
Fri Jun 15 10:35:44 2018 response github.com from 202.106.195.68:53 - 13.229.188.59, filter
Fri Jun 15 10:35:44 2018 response github.com from 202.106.195.68:53 - 13.229.188.59, filter
Fri Jun 15 10:35:49 2018 request github.com from 202.106.195.68:53 127.0.0.1:5300
Fri Jun 15 10:35:49 2018 response github.com from 202.106.195.68:53 - 13.229.188.59, filter
@aa65535
Copy link
Owner

aa65535 commented Jun 15, 2018

无法复现你说的问题。

@dawncold
Copy link
Author

@aa65535 我另一台设备也正常,但这台就会有这样奇怪的问题。

@dawncold
Copy link
Author

@aa65535 我发现ChinaDNS配置成这样就可以用了:114.114.114.114,127.0.0.1#5300,不能用冒号。此时我的dns-forwarder已经设置抓发到1.1.1.1

@pexcn
Copy link

pexcn commented Jun 15, 2018

@aa65535 @dawncold 更新一下 chnroute.txt 再测试一下看看有没有这个问题?

@dawncold
Copy link
Author

dawncold commented Jun 16, 2018

@pexcn 我更新过了,那个文件和这个问题没关系吧,那个文件只是用来判断DNS返回的IP而不是DNS Server本身

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

3 participants