shadowsocks / ChinaDNS

Protect yourself against DNS poisoning in China.
GNU General Public License v3.0
3.6k stars 1.29k forks source link

[solved]出不来dig查询结果 #143

Closed plutoid closed 6 years ago

plutoid commented 6 years ago

hi,

环境:

服务端:

CentOS release 6.9 - 4.16.5-1.el6.elrepo.i686 Shadowsocks 2.8.2

客户端:

环境树莓派做透明网关 debian9 Linux raspberrypi 4.9.59+ #1047 Sun Oct 29 11:47:10 GMT 2017 armv6l GNU/Linux ChinaDNS 1.3.2 shadowsocks-libev 2.6.3 with mbed TLS 2.4.2

ss服务端除了用户密码之类,我是这么跑的:

/usr/bin/ssserver -c /root/sss.config --workers 4  -qq --log-file /var/log/ssserver.log --pid-file /var/run/ssserver.pid -d start

跑tunnel,

ss-tunnel -s x.x.xx.xx -p 443 -b 0.0.0.0 -l 5300 -k passme -m rc4-md5 -L 8.8.8.8:53 -v -u

log上看是有做查询:

 2018-05-16 06:31:46 INFO: [udp] server receive a packet
 2018-05-16 06:31:46 INFO: sockaddr_cmp: sin_family equal? 1
 2018-05-16 06:31:46 INFO: sockaddr_cmp: sin_port equal? 1
 2018-05-16 06:31:46 INFO: [udp] cache hit: 8.8.8.8:53 <-> 127.0.0.1:41441
 2018-05-16 06:31:51 INFO: [udp] server receive a packet
 2018-05-16 06:31:51 INFO: sockaddr_cmp: sin_family equal? 1
 2018-05-16 06:31:51 INFO: sockaddr_cmp: sin_port equal? 1
 2018-05-16 06:31:51 INFO: [udp] cache hit: 8.8.8.8:53 <-> 127.0.0.1:41441  

运行chinadns,运行时看上去是正常的, 国内查询用了阿里的dns 223.5.5.5:

root@raspberrypi:~/proxyscript/chinadns-1.3.2# /usr/local/bin/chinadns -c /etc/chinadns/chnroute.txt -m -v -p 5354 -s 223.5.5.5,127.0.0.1:5300

查询延迟后没结果:

root@raspberrypi:~/proxyscript# dig  +time=2 +short @192.168.2.155  -p5354  www.google.us
;; connection timed out; no servers could be reached

chinadns的log,看上去也没什么异常

Tue May 15 22:49:10 2018 request www.google.us
Tue May 15 22:49:10 2018 response www.google.us from 223.5.5.5:53 - 172.217.160.99, filter
Tue May 15 22:49:12 2018 request www.google.us
Tue May 15 22:49:12 2018 response www.google.us from 223.5.5.5:53 - 172.217.160.99, filter
Tue May 15 22:49:14 2018 request www.google.us
Tue May 15 22:49:14 2018 response www.google.us from 223.5.5.5:53 - 172.217.160.99, filter
..
Tue May 15 23:23:35 2018 response v2ex.com from 223.5.5.5:53 - 115.238.195.151, 113.113.64.29, 115.238.195.152, 113.113.64.28, pass
Tue May 15 23:23:48 2018 request twitter.com
Tue May 15 23:23:48 2018 response twitter.com from 223.5.5.5:53 - 67.228.102.32, filter

想不出来哪出了问题, 求指教了! update: filter原来是忽略国内dns查询的结果. update: 改为c语言版 shadowsocks-libev 3.1.3 打开udp,似乎还不行

updae: 解决了, 把 dnsmasq的进程关了就可以用 dig +time=2 +short @192.168.2.155 -p5354 www.google.us 来做查询, 还是有点想不通, 大家都去做这个查询, 有什么冲突么?