NAT內網回源問題
#
nat alg dns enable #命令使能ALG DNS功能,才可以使DNS應答報文正常穿越NAT
#
nat dns-map domain.cn x.x.x.x 80 tcp #用來配置一條域名到外部IP地址、端口號、協議類型的映射
方案一:
!!!外網口
[Gateway-GigabitEthernet0/1]nat server protocol tcp global x.x.x.x www inside 10.110.1.2 www
// 注意dns-map 配置中對應的地址是公網地址而不是服務器的內網地址
[Gateway] nat dns-map domain www.server.com protocol tcp ip x.x.x.x port www
方案二:
[Gateway]acl number 3001
//編寫acl 匹配來自內網網段目的地址為兩台server的數據流
[Gateway-acl-adv-3000]rule permit ip source 192.168.0.0 0.0.255.255 destination 10.110.1.1 0
//將nat及nat server 配置下發在內外網網關口上
[Gateway-GigabitEthernet0/0]nat server protocol tcp global x.x.x.x www inside 10.110.1.2 www
[Gateway-GigabitEthernet0/5]nat server protocol tcp global x.x.x.x www inside 10.110.1.2 www
[Gateway-GigabitEthernet0/0]nat outbound 3001