今天我一直在unbound.conf中玩一些选项只是为了好玩.我启用了tcp-upstream,但它不适用于某些域.
操作系统:OpenBSD当前.不作承诺:1.4.19
启用tcp-upstream的示例:
--> dig www.google.com ; <<>> DiG 9.4.2-P2 <<>> www.google.com ;; global options: printcmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY,status: NOERROR,id: 30362 ;; flags: qr rd ra; QUERY: 1,ANSWER: 5,AUTHORITY: 0,ADDITIONAL: 0 ;; QUESTION SECTION: ;www.google.com. IN A ;; ANSWER SECTION: www.google.com. 43200 IN A 173.194.34.210 www.google.com. 43200 IN A 173.194.34.212 www.google.com. 43200 IN A 173.194.34.211 www.google.com. 43200 IN A 173.194.34.209 www.google.com. 43200 IN A 173.194.34.208 ;; Query time: 579 msec ;; SERVER: 127.0.0.1#53(127.0.0.1) ;; WHEN: Wed Feb 20 01:01:54 2013 ;; MSG SIZE rcvd: 112 --> dig www.facebook.com ; <<>> DiG 9.4.2-P2 <<>> www.facebook.com ;; global options: printcmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY,status: SERVFAIL,id: 48116 ;; flags: qr rd ra; QUERY: 1,ANSWER: 0,ADDITIONAL: 0 ;; QUESTION SECTION: ;www.facebook.com. IN A ;; Query time: 4529 msec ;; SERVER: 127.0.0.1#53(127.0.0.1) ;; WHEN: Wed Feb 20 01:02:05 2013 ;; MSG SIZE rcvd: 34
/ var / log / messages显示facebook查询的此错误:
unbound: [29654:0] error: tcp connect: Connection refused
禁用tcp-upstream:
--> dig www.facebook.com ; <<>> DiG 9.4.2-P2 <<>> www.facebook.com ;; global options: printcmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY,id: 50721 ;; flags: qr rd ra; QUERY: 1,ANSWER: 2,ADDITIONAL: 0 ;; QUESTION SECTION: ;www.facebook.com. IN A ;; ANSWER SECTION: www.facebook.com. 43200 IN CNAME star.c10r.facebook.com. star.c10r.facebook.com. 43200 IN A 173.252.101.26 ;; Query time: 692 msec ;; SERVER: 127.0.0.1#53(127.0.0.1) ;; WHEN: Wed Feb 20 01:06:20 2013 ;; MSG SIZE rcvd: 74
我猜问题是有些服务器不允许tcp客户端.一些
解决此问题的方法? tcp-upstream真的可以在现实世界中使用吗?
我知道UDP是一种更好的DNS协议.我不需要回答“使用UDP代替”.我只是询问DNS over TCP的这个问题,以及这在现实世界中是否可靠.