防火墙后面的RHEL 6.3上的DNSparsing超时

我有一台服务器在VMWare虚拟机内部运行Red Hat 6.3 Enterprise。 服务器和Internet之间有一个Juniper SSG 5防火墙。 我试图诊断它是什么样的DNS查找超时,但我恐怕没有所需的知识做到这一点。

这是tcpdump的输出,当我做一个$ wget www.google.com.br

 $ tcpdump -i eth0 -n -vvv不是端口ssh

 14:15:15.361010 IP(tos 0x0,tt164,id 8975,offset 0,flags [DF],proto UDP(17),length 63)
     192.168.1.12.54835> 200.196.66.30.domain:[bad udp cksum f4e1!] 47797+ A?  www.google.com.br。  (35)
 14:15:15.361195 IP(tos 0x0,tt164,id 8976,offset 0,flags [DF],proto UDP(17),length 63)
     192.168.1.12.54835> 200.196.66.30.domain:[bad udp cksum 4e62!] 8028+ AAAA?  www.google.com.br。  (35)
 14:15:15.362122 IP(tos 0x0,tt161,id 25375,offset 0,flags [none],proto UDP(17),length 283)
     200.196.66.30.domain> 192.168.1.12.54835:[udp sum ok] 47797 q:A?  www.google.com.br。  4/4/4 www.google.com.br。  [1m] CNAME www-cctld.l.google.com。,www-cctld.l.google.com。  [4m47s] A 74.125.234.184,www-cctld.l.google.com。  [4m47s] A 74.125.234.191,www-cctld.l.google.com。  [4m47s] A 74.125.234.183 ns:google.com。  [20h11m12s] NS ns1.google.com。,google.com。  [20h11m12s] NS ns2.google.com。,google.com。  [20h11m12s] NS ns3.google.com。,google.com。  [20h11m12s] NS ns4.google.com。  ar:ns1.google.com。  [3d1h39m] A 216.239.32.10,ns2.google.com。  [3d23h47m54s] A 216.239.34.10,ns3.google.com。  [3d21h48m53s] A 216.239.36.10,ns4.google.com。  [3d14h11m28s] A 216.239.38.10(255)
 14:15:20.365434 IP(tos 0x0,tt164,id 8977,offset 0,flags [DF],proto UDP(17),length 63)
     192.168.1.12.54835> 200.196.66.30.domain:[bad udp cksum f4e1!] 47797+ A?  www.google.com.br。  (35)
 14:15:20.366657 IP(tos 0x0,tt161,id 25377,offset 0,flags [none],proto UDP(17),length 283)
     200.196.66.30.domain> 192.168.1.12.54835:[udp sum ok] 47797 q:A?  www.google.com.br。  4/4/4 www.google.com.br。  [55] CNAME www-cctld.l.google.com,www-cctld.l.google.com。  [4分42秒] A 74.125.234.191,www-cctld.l.google.com。  [4分42秒] A 74.125.234.183,www-cctld.l.google.com。  [4m42s] A 74.125.234.184 ns:google.com。  [20h11m7s] NS ns4.google.com。,google.com。  [20h11m7s] NS ns2.google.com。,google.com。  [20h11m7s] NS ns3.google.com。,google.com。  [20h11m7s] NS ns1.google.com。  ar:ns1.google.com。  [3d1h38m55s] A 216.239.32.10,ns2.google.com。  [3d23h47m49s] A 216.239.34.10,ns3.google.com。  [3d21h48m48s] A 216.239.36.10,ns4.google.com。  [3d14h11m23s] A 216.239.38.10(255)
 14:15:20.366760 IP(tos 0x0,tt164,id 8978,offset 0,flags [DF],proto UDP(17),length 63)
     192.168.1.12.54835> 200.196.66.30.domain:[bad udp cksum 4e62!] 8028+ AAAA?  www.google.com.br。  (35)
 14:15:20.368486 IP(tos 0x0,tt161,id 25378,offset 0,flags [none],proto UDP(17),length 263)
     200.196.66.30.domain> 192.168.1.12.54835:[udp sum ok] 8028 q:AAAA?  www.google.com.br。  2/4/4 www.google.com.br。  [55] CNAME www-cctld.l.google.com,www-cctld.l.google.com。  [3m7s] AAAA 2800:3f0:4001:805 :: 1017 ns:google.com。  [20h11m7s] NS ns3.google.com。,google.com。  [20h11m7s] NS ns2.google.com。,google.com。  [20h11m7s] NS ns4.google.com。,google.com。  [20h11m7s] NS ns1.google.com。  ar:ns1.google.com。  [3d1h38m55s] A 216.239.32.10,ns2.google.com。  [3d23h47m49s] A 216.239.34.10,ns3.google.com。  [3d21h48m48s] A 216.239.36.10,ns4.google.com。  [3d14h11m23s] A 216.239.38.10(235)
 14:15:20.368936 IP(tos 0x0,tt164,id 36272,offset 0,flags [DF],proto TCP(6),length 60)
     192.168.1.12.58407> 74.125.234.191.http:标志[S],cksum 0xa695(正确),seq 2103294767,win 14600,选项[mss 1460,sackOK,TS val 499988127 ecr 0,nop,wscale 7],长度0
 14:15:20.370424 IP(tos 0x0,tt158,id 12210,offset 0,flags [none],proto TCP(6),length 60)
     74.125.234.191.http:192.168.1.12.58407:Flags [S.],cksum 0x2a65(correct),seq 1378505609,ack 2103294768,win 14180,options [mss 1430,sackOK,TS val 4016826562 ecr 499988127,nop,wscale 6 ],长度为0
 [...]

第三和第四行之间的5秒延迟发生一致。

不能使用nslookupdigdig +dnssec重现延迟,所以我没有想法。

有没有人有任何线索,可能是什么问题?

这发生在双栈IPv4 / IPv6环境中,执行DNS查找的机器在同一个套接字上发送AAAA和Alogging的请求,期望收到两个回复。 这是相对最新版本的glibc的默认行为 。 但是,Juniper防火墙会在第一个回复结束后断开连接。

Juniper知识库中有一篇文章描述如何configuration防火墙来解决这个问题 。

正如@BMDan指出的那样,您也可以将这行添加到/etc/resolv.conf

 options single-request-reopen 

这可以通过打开两个连接来查找AAAA和Alogging来防止破坏的防火墙行为。