華為AR路由器NAT局域網訪問內網服務器域名解析問題


 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

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM