ChinaDNS icon indicating copy to clipboard operation
ChinaDNS copied to clipboard

The problem of ChinaDNS port?

Open hduffddybz opened this issue 9 years ago • 19 comments

I have a lot of websites to resolve in the internal network, but I have encountered a problem, the setting of ChinaDNS listed below: dns The setting of DNSmasq are listed: dns2

I also set "Ignore resolve file".

and when I am using the dig command to debug it, it get me confused that: 1 2

But the result of resolving Google, facebook and Youtube seems all correct. how to fix it?

hduffddybz avatar Mar 11 '15 01:03 hduffddybz

I get more confusion about it! OpenWrt:"/usr/bin/chinadns -s 114.114.114.114,107...: -p 5353 -c /etc/chinadns_chnroute.txt -l /etc/chinadns_iplist.txt -y 0.3 -v" Win7 PC:"dig @192.168.1.1 cwc.hdu.edu.cn" Result: 1 2

hduffddybz avatar Mar 11 '15 06:03 hduffddybz

Add private ip address to your chnroute file

cpktpoetkxwz avatar Mar 12 '15 00:03 cpktpoetkxwz

@Pentiumluyu Why have to change the chnroute file? It seems that chnroute.txt file was used to distinguish the process of website resolving that whether to direct to abroad.

hduffddybz avatar Mar 12 '15 01:03 hduffddybz

Since those private IP addresses are not in the chnroute file, they would be treated as foreign ip addresses. Therefore, when a answer contains private IP, chinadns will wait for the designated foreign DNS servers to reply.

cpktpoetkxwz avatar Mar 12 '15 01:03 cpktpoetkxwz

Current Version: 1.3.0

aa65535 avatar Mar 12 '15 01:03 aa65535

Hi!Thanks all of your patient reply! @Pentiumluyu the ip address which should be resolved is from 192.168.0.0 to 192.168.255.255, so what I should add is "192.168.0.0/16" is it right?But it did not change anything.

(It is another problem) @aa65535 And now I change the version to 1.3.0 and seems it did not change anything! And one more problem is that when I do the process below:

  1. opkg remove ChinaDNS
  2. opkg install chinadns and the display of chinadns is gone! I try many times of the process "opkg remove luci-app-chinadns" and "opkg install luci-app-chinadns".But it did not take effect. How to deal with this strange problem!

hduffddybz avatar Mar 12 '15 06:03 hduffddybz

It is not stable to resolve the internal ip address

hduffddybz avatar Mar 12 '15 11:03 hduffddybz

It is not stable!Sometimes it is really hard to open the internal network!

hduffddybz avatar Mar 13 '15 01:03 hduffddybz

@hduffddybz Can you post the verbose logs after adding "192.168.0.0/16" to your chnroute file?

cpktpoetkxwz avatar Mar 13 '15 01:03 cpktpoetkxwz

Hi!

  • dig @192.168.1.1 cwc.hdu.edu.cn +trace and get the output:

; <<>> DiG 9.10.1-P1 <<>> @192.168.1.1 cwc.hdu.edu.cn +trace ; (1 server found) ;; global options: +cmd . 419121 IN NS i.root-servers.net. . 419121 IN NS e.root-servers.net. . 419121 IN NS d.root-servers.net. . 419121 IN NS j.root-servers.net. . 419121 IN NS h.root-servers.net. . 419121 IN NS m.root-servers.net. . 419121 IN NS g.root-servers.net. . 419121 IN NS l.root-servers.net. . 419121 IN NS k.root-servers.net. . 419121 IN NS b.root-servers.net. . 419121 IN NS a.root-servers.net. . 419121 IN NS f.root-servers.net. . 419121 IN NS c.root-servers.net. ;; Received 239 bytes from 192.168.1.1#53(192.168.1.1) in 23 ms

cwc.hdu.edu.cn. 234 IN A 192.168.100.6 ;; Received 59 bytes from 192.36.148.17#53(i.root-servers.net) in 344 ms

  • and I command "tcpdump -i br-lan src or dst host 192.168.100.6" on the openwrt and then open the browser to go through the website of "cwc.hdu.edu.cn".But it did not get any output from tcpdump, any I also do the similar process on the wireshark, but nothing happen.

hduffddybz avatar Mar 13 '15 04:03 hduffddybz

I mean logs of chinadns.

cpktpoetkxwz avatar Mar 13 '15 05:03 cpktpoetkxwz

In the file /tmp/log/chinadns.err.log, it get the message: Fri Mar 13 05:12:12 2015 chinadns.c:577 ns_initparse: Message too long for many times.

hduffddybz avatar Mar 13 '15 05:03 hduffddybz

That error occurs when you enable pointer compression mutation, which doesn't affect the resolving process. Run chinadns with option "-v" manually to get verbose logs.

cpktpoetkxwz avatar Mar 13 '15 05:03 cpktpoetkxwz

OK!The logs list: Fri Mar 13 05:32:45 2015 request cwc.hdu.edu.cn Fri Mar 13 05:32:45 2015 response cwc.hdu.edu.cn from 114.114.114.114:53 - 192.168.100.6, delay Fri Mar 13 05:32:45 2015 response cwc.hdu.edu.cn from 107.170..:(foreign DNS) - 192.168.100.6, delay Fri Mar 13 05:32:48 2015 request cwc.hdu.edu.cn Fri Mar 13 05:32:48 2015 request cwc.hdu.edu.cn Fri Mar 13 05:32:48 2015 request cwc.hdu.edu.cn Fri Mar 13 05:32:48 2015 response cwc.hdu.edu.cn from 114.114.114.114:53 - 192.168.100.6, delay Fri Mar 13 05:32:48 2015 response cwc.hdu.edu.cn from 114.114.114.114:53 - 192.168.100.6, delay Fri Mar 13 05:32:48 2015 response cwc.hdu.edu.cn from 114.114.114.114:53 - 192.168.100.6, delay Fri Mar 13 05:32:48 2015 response cwc.hdu.edu.cn from 107.170..: - 192.168.100.6, delay Fri Mar 13 05:32:48 2015 response cwc.hdu.edu.cn from 107.170_.:* - 192.168.100.6, delay Fri Mar 13 05:32:48 2015 response cwc.hdu.edu.cn from 107.170..:* - 192.168.100.6, delay Fri Mar 13 05:32:56 2015 request cwc.hdu.edu.cn Fri Mar 13 05:32:56 2015 response cwc.hdu.edu.cn from 114.114.114.114:53 - 192.168.100.6, delay Fri Mar 13 05:32:56 2015 response cwc.hdu.edu.cn from 107.170.._:* - 192.168.100.6, delay

hduffddybz avatar Mar 13 '15 05:03 hduffddybz

It seems adding private ip addresses doesn't work. Is the path corrected? I'll try this method tonight.

cpktpoetkxwz avatar Mar 13 '15 05:03 cpktpoetkxwz

But using the command "dig @192.168.1.1 cwc.hdu.edu.cn" to resolve the website and the result of it is correct!(Compare to the other router that can access "cwc.hdu.edu.cn")

hduffddybz avatar Mar 13 '15 05:03 hduffddybz

Before adding 192.168.0.0/16 to chnroute.txt. screen shot 2015-03-13 at 7 11 56 pm Chinadns treated 192.168.100.6 as a foreign ip address, it would wait for foreign dns to reply.

After adding 192.168.0.0/16 to chnroute.txt screen shot 2015-03-13 at 7 12 37 pm 192.168.100.6 was recognised as a Chinese ip address, and chinadns would less it pass. (I used the "-d" option and "-m" option to enable bidirectional filtering and dns compression mutation respectively.)

I think there was something wrong with your dnsmasq's configuration. It seems that the requests were not forwarded to chinadns.

cpktpoetkxwz avatar Mar 13 '15 11:03 cpktpoetkxwz

You can see the output list below: 1 really strange!

hduffddybz avatar Mar 13 '15 11:03 hduffddybz

I think that's the same problem as #56.

cpktpoetkxwz avatar Mar 13 '15 12:03 cpktpoetkxwz