Closed susanooxyz closed 6 years ago
不要手动修改 chinadns_chnroute 文件!
你往里面添加错误的 IP 地址后,会让 chinadns 认为此 IP 是国内 IP,当 114DNS 返回此 IP 时,结果自然会被 pass。
没有手动修改chinadns_chnroute啊,-l /etc/chinadns_ignore.list,我是在这个文件里加了那个ip地址
使用 -s 114.114.114.114,127.0.0.1:5354
, 不要使用 #
, 否则会忽略 chinadns_ignore
可能是-s 114.114.114.114,127.0.0.1:5354,使用的#的原因,我晚上不用#试试看
Fri Dec 15 20:20:34 2017 request www.google.com from 114.114.114.114:53 127.0.0.1:5354 Fri Dec 15 20:20:34 2017 request www.google.com from 114.114.114.114:53 127.0.0.1:5354 Fri Dec 15 20:20:34 2017 response www.google.com from 114.114.114.114:53 - 111.13.111.136, filter Fri Dec 15 20:20:34 2017 response www.google.com from 114.114.114.114:53 - 111.13.111.136, filter Fri Dec 15 20:20:35 2017 response www.google.com from 127.0.0.1:5354 - 172.217.11.68, delay Fri Dec 15 20:20:35 2017 response www.google.com from 127.0.0.1:5354 - 216.58.219.4, delay
不过delay是表示有延迟?
root@LEDE:~# chinadns -V ChinaDNS 1.3.2 安装包ChinaDNS_1.3.2-5_mips_24kc.ipk
root@LEDE:~# /usr/bin/chinadns -p 5353 -s 114.114.114.114,127.0.0.1#5354 -c /etc/chinadns_chnroute.txt -l /etc/chinadns_ignore.list -v Thu Dec 14 23:39:34 2017 request www.google.com from 114.114.114.114:53 127.0.0.1:5354 Thu Dec 14 23:39:34 2017 response www.google.com from 114.114.114.114:53 - 111.13.111.136, pass Thu Dec 14 23:39:34 2017 response www.google.com from 127.0.0.1:5354 - 172.217.14.68, pass
/etc/chinadns_ignore.list 中配置了ip 111.13.111.136
但是dig www.google.com依然是111.13.111.136, dig www.google.com @127.0.0.1 -p 5353
; <<>> DiG 9.10.4-P5 <<>> www.google.com @127.0.0.1 -p 5353 ;; global options: +cmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 5380 ;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 4, ADDITIONAL: 4
;; QUESTION SECTION: ;www.google.com. IN A
;; ANSWER SECTION: www.google.com. 1801 IN A 111.13.111.136
;; AUTHORITY SECTION: google.com. 80220 IN NS ns1.google.com. google.com. 80220 IN NS ns4.google.com. google.com. 80220 IN NS ns3.google.com. google.com. 80220 IN NS ns2.google.com.
;; ADDITIONAL SECTION: ns1.google.com. 28179 IN A 216.239.32.10 ns2.google.com. 11431 IN A 216.239.34.10 ns3.google.com. 17096 IN A 216.239.36.10 ns4.google.com. 20730 IN A 216.239.38.10
;; Query time: 4 msec ;; SERVER: 127.0.0.1#5353(127.0.0.1) ;; WHEN: Fri Dec 15 00:00:12 CST 2017 ;; MSG SIZE rcvd: 184
tcp返回正确的地址,5354是dns-forward的端口 dig www.google.com @127.0.0.1 -p 5354
; <<>> DiG 9.10.4-P5 <<>> www.google.com @127.0.0.1 -p 5354 ;; global options: +cmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 46757 ;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1
;; OPT PSEUDOSECTION: ; EDNS: version: 0, flags:; udp: 512 ;; QUESTION SECTION: ;www.google.com. IN A
;; ANSWER SECTION: www.google.com. 155 IN A 172.217.11.164
;; Query time: 395 msec ;; SERVER: 127.0.0.1#5354(127.0.0.1) ;; WHEN: Fri Dec 15 00:00:05 CST 2017 ;; MSG SIZE rcvd: 59