思科DNS篡改或发夹?


8

我具有以下配置:CISCO 881,IOS 15.2(4)M6。在WAN接口上,从我们的ISP配置了86.34.156.48/29子网。路由器后面是2个Web服务器。NAT:86.34.156.51 <> 10.10.10.100(专用IP,server1)。如果我使用服务器的外部IP(86.34.156.51)配置BIND DNS服务器A记录,则外部世界永远不会从我的DNS服务器获得响应(我不知道那里会发生什么,也许路由器会进行DNS篡改或其他操作)类似(这是一个问题)),并确保DNS服务器已配置并正常工作(我使用TCPdump捕获了IP数据包)。但是,如果我使用服务器专用IP(10.10.10.100)配置DNS服务器A记录,则数据包总是到达了正确的目的地(使用服务器外部IP,也可能是DNS篡改)。

我能做什么???

        +-----+
        |     |  an other host somewhere on internet(C)
        |     |
        +-----+
            |
            |
            :
            :  internet
            :

            |  

        +-----+
        |     |      ISP's router
        |     |       black box, without acces
        +-----+

            |
            | 86.34.456.48/29
        +-----+
        |     |      CISCO 881,
        |     |       IOS 15.2(4)M6
        +-----+
            |
            |
------------------------------------------------------------  local private network 10.10.10.0/24
    |                                           |
    | (86.34.156.51)                            | (Nat rule not yet attached)
    | 10.10.10.100                              | 10.10.10.101
    |                                           |
+-----+                                       +-----+
|     |                                       |     |
|     |                                       |     |
+-----+                                       +-----+
linux server (A)                                linux server (B)
BIND DNS server
 style2take.ro

这是一些挖掘(Linux下的dns诊断工具):

从主机B:$ dig style2take.ro

;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 42222
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4096
;; QUESTION SECTION:
;style2take.ro.                 IN      A

;; ANSWER SECTION:
style2take.ro.          0       IN      A       10.10.10.100                                                <-- here you can see the TTL is 0

;; Query time: 52 msec
;; SERVER: 193.231.100.130#53(193.231.100.130)
;; WHEN: Fri Feb 20 10:27:25 EET 2015
;; MSG SIZE  rcvd: 58

从主机B:$ dig @ 10.10.10.100 style2take.ro

;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 65374
;; flags: qr aa rd; QUERY: 1, ANSWER: 1, AUTHORITY: 2, ADDITIONAL: 3
;; WARNING: recursion requested but not available

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4096
;; QUESTION SECTION:
;style2take.ro.                 IN      A

;; ANSWER SECTION:
style2take.ro.          3600    IN      A       10.10.10.100                                                <-- here you can see the TTL is 3600

;; AUTHORITY SECTION:
style2take.ro.          3600    IN      NS      ns1.style2take.ro.
style2take.ro.          3600    IN      NS      ns2.style2take.ro.

;; ADDITIONAL SECTION:
ns1.style2take.ro.      3600    IN      A       10.10.10.100
ns2.style2take.ro.      3600    IN      A       10.10.10.100

;; Query time: 0 msec
;; SERVER: 10.10.10.100#53(10.10.10.100)
;; WHEN: Fri Feb 20 10:28:58 EET 2015
;; MSG SIZE  rcvd: 126

从主机C:$ dig style2take.ro

;; global options:  printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 32364
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 6, ADDITIONAL: 0

;; QUESTION SECTION:
;style2take.ro.                 IN      A

;; ANSWER SECTION:
style2take.ro.          0       IN      A       86.34.156.51                                                <-- here you can see the TTL is 0

;; AUTHORITY SECTION:
ro.                     106161  IN      NS      sns-pb.isc.org.
ro.                     106161  IN      NS      primary.rotld.ro.
ro.                     106161  IN      NS      sec-dns-a.rotld.ro.
ro.                     106161  IN      NS      sec-dns-b.rotld.ro.
ro.                     106161  IN      NS      dns-at.rotld.ro.
ro.                     106161  IN      NS      dns-ro.denic.de.

;; Query time: 149 msec
;; SERVER: 82.79.24.74#53(82.79.24.74)
;; WHEN: Fri Feb 20 10:29:52 2015
;; MSG SIZE  rcvd: 201

从主机C:$ dig @ 86.34.156.51 style2take.ro

; (1 server found)
;; global options:  printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 48385
;; flags: qr aa rd; QUERY: 1, ANSWER: 1, AUTHORITY: 2, ADDITIONAL: 2

;; QUESTION SECTION:
;style2take.ro.                 IN      A

;; ANSWER SECTION:
style2take.ro.          0       IN      A       86.34.156.51                                                <-- here you can see the TTL is 0

;; AUTHORITY SECTION:
style2take.ro.          0       IN      NS      ns2.style2take.ro.
style2take.ro.          0       IN      NS      ns1.style2take.ro.

;; ADDITIONAL SECTION:
ns1.style2take.ro.      0       IN      A       86.34.156.51
ns2.style2take.ro.      0       IN      A       86.34.156.51

;; Query time: 29 msec
;; SERVER: 86.34.156.51#53(86.34.156.51)
;; WHEN: Fri Feb 20 10:35:05 2015
;; MSG SIZE  rcvd: 115

发夹在哪里出现?
bao7uo

Answers:


0

好吧,如果您没有解决DNS问题,那么问题可能有两个:

  1. DNS配置不正确-全球DNS系统能否分辨出您所在域的NS?这是您需要在名称提供者处设置的内容。什么是dig style2take.ro NS输出?

  2. 您的路由器不允许DNS请求。在外面的服务器上尝试通过telnet到DNS的端口53 telnet 86.34.156.51-DNS应该同时通过UDP和TCP起作用,这至少测试了TCP部分。


0

您不需要在任何DNS设置(命名)配置中都具有外部IP。您可以在任何地方使用内部地址(10.10.10.100),并将其从路由器NAT到86.34.156.51(ip nat inside source static 10.10.10.100 86.34.156.51)。如果要配置辅助DNS,则同样适用于此:使用10.10.10.101(作为NS2)对其他对象进行NAT(例如86.34.156.51)。另外,请确保DNS端口实际上是在路由器中转发的,并且未被Linux服务器中的防火墙阻止。使用基于Web的端口检查器来确保UDP 53已打开。

By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.