内网用户通过域名访问内网访问器

服务器内网IP:192.168.0.2
映射的公网IP:8.8.8.8 对应的域名:www.163.com  在公网DNS服务器上配置映射关系
路由器LAN口IP:192.168.0.1

ip nat inside source static tcp 192.168.0.1 80 8.8.8.8 80

内网电脑使用思科路由器作为首选DNS Server:192.168.0.1

Router(config)# ip dns server            
Router(config)# ip domain-lookup          
Router(config)# ip name-server 202.14.67.14      
Router(config)# ip host www.163.com 192.168.0.2
 
ip dhcp pool dhcppool
            network 192.168.0.0 255.255.255.0
              dns-server 192.168.0.1 202.14.67.14
              default-router 192.168.0.1

 


  补充:
内网PC可以手动设置IP地址,可只指定一个DNS Server:192.168.0.1,当内网PC查询www.163.com时解析的IP是192.168.0.2,其它公网域名请求由路由器转发给name-server:202.14.67.14。
以上个人理解,不知是否正确。

 

你可能感兴趣的:(职场,域名,休闲,内网,思科)