本文共 1020 字,大约阅读时间需要 3 分钟。
示例以FTP服务 为例:客户要求 FTP服务 内网用户同样都可以使用外网ip地址进行访问
设备:路由器AR151-S2 出接口G0/0/0 IP: 192.168.1.42 内网接口 vlan 1 ip:192.168.5.1 FTP server ip:192168.5.254 client IP: 192.168.5.2 dis cu [V200R007C00SPCb00]acl number 3010 // 配置内网用户访问外网数据流
rule 20 permit ip source 192.168.5.0 0.0.0.255 acl number 3030 // 配置内网用户访问内网服务器数据流 rule 20 permit ip source 192.168.5.0 0.0.0.255 destination 192.168.1.42 0interface Vlanif1
ip address 192.168.5.1 255.255.255.0 nat static protocol tcp global interface GigabitEthernet 0/0/4 ftp inside 192.168.5.254 ftp netmask 255.255.255.255 //配置内网用户访问内网服务器,保证内网用户使用192.168.1.42可以访问内网服务器 凉意红色接口 nat outbound 3030 dhcp select interface dhcp server dns-list 114.114.114.114interface GigabitEthernet0/0/4
nat static protocol tcp global current-interface ftp inside 192.168.5.254 ftp netmask 255.255.255.255 //配置外网用户访问内网服务器,保证外网用户使用192.168.1.42可以访问内网服务器 注意红色接口 nat outbound 3010 ip address 192.168.1.42 255.255.255.0ip route-static 0.0.0.0 0.0.0.0 192.168.1.1 //配置缺省路由,保证内网用户与外网互通
return
主要配置步骤,省略了好多其他设置,如有不足请谅解转载地址:http://lvodi.baihongyu.com/