Cisco 2811 – 禁用DNS重写

我们有两台configurationHSRP的Cisco 2811路由器,用一些vlan来保护networking。 我们有隐藏在那里的contoso.com区域的第二个公共DNS,以及邮件服务器mail1.contoso.com在其专用的公共IP地址之外的NAT。 我们遇到了从该邮件服务器公共地址的路由器后面的任何networking启动的DNS请求返回一个NATed私有IP地址。 我们设法收集来自双方的数据包,有效地发现2811确实改变了从外部到内部的数据包中的IP地址,其中内部全局IP地址用于本地IP地址内部。 这可能是正常的,但是这个过程会干扰受保护的辅助DNS服务器的DNS区域传输,导致它接收NATed地址而不是公共地址,然后将专用地址服务到Internet而不是服务于公共IP地址。 我们没有find确切的命令来禁用DNS重写,这里列出的思科 – NAT导致nslookup返回本地IP不被接受。 我们应该如何至less避免思科干扰DNS区域传输? 充其量我们想要完全禁用这个DNS重写。

NAT完成如下:

 ip nat inside source static tcp 10.xx9 53 217.xxx 53 route-map RM-NAT-ISP extendable ip nat inside source static udp 10.xx9 53 217.xxx 53 route-map RM-NAT-ISP extendable ip nat inside source static 10.xx31 217.xxy route-map RM-NAT-VNETWORK01-EXCHANGE 

DNS是通过单个端口进行NAT转换的,由于configuration中存在VPN,因此遭受DNS重写的服务器与路由映射静态NAT。 有一份文件指出,思科路由器不应该使用路由映射对DNS进行静态NAT重写,并且不应该干扰DNS区域传输 – 但我们观察到相反的情况。 IOS版本信息:

 R1#sh ver Cisco IOS Software, 2800 Software (C2800NM-ADVENTERPRISEK9-M), Version 12.4(25b), RELEASE SOFTWARE (fc1) Technical Support: http://www.cisco.com/techsupport Copyright (c) 1986-2009 by Cisco Systems, Inc. Compiled Wed 12-Aug-09 11:53 by prod_rel_team ROM: System Bootstrap, Version 12.4(13r)T11, RELEASE SOFTWARE (fc1) R1 uptime is 33 weeks, 6 days, 9 hours, 55 minutes System returned to ROM by Reload Command System restarted at 03:43:40 GMT+3 Tue Jul 19 2016 System image file is "flash:c2800nm-adventerprisek9-mz.124-25b.bin" <snip> Cisco 2811 (revision 53.51) with 512000K/12288K bytes of memory. Processor board ID FGL153312DD 2 FastEthernet interfaces 1 Virtual Private Network (VPN) Module DRAM configuration is 64 bits wide with parity enabled. 239K bytes of non-volatile configuration memory. 126976K bytes of ATA CompactFlash (Read/Write) Configuration register is 0x2102 

ip nat service ? 输出:

 R1(config)#ip nat service ? H225 H323-H225 protocol allow-h323-keepalive Allow H323 KeepAlive allow-sip-even-rtp-ports Allow even RTP ports for SIP append-ldap-search-res Append ldap search result fullrange allocate all available port of 1 to 65535 list Specify access list describing global addresses mgcp Media Gateway Control Protocol nbar nbar protocol ras H323-RAS protocol rtsp Real Time Streaming Protocol sip SIP protocol skinny skinny protocol 

您应该在DNS服务器的ip nat inside source static映射ip nat inside source staticip nat inside source static末尾添加no-payload选项。