博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
华为路由器配置NAT使内网用户通过外网IP地址方式访问内网服务器示例
阅读量:4041 次
发布时间:2019-05-24

本文共 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 0

interface 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.114

interface 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.0

ip route-static 0.0.0.0 0.0.0.0 192.168.1.1 //配置缺省路由,保证内网用户与外网互通

return

主要配置步骤,省略了好多其他设置,如有不足请谅解

转载地址:http://lvodi.baihongyu.com/

你可能感兴趣的文章
Qt继电器控制板代码
查看>>
wpa_supplicant控制脚本
查看>>
gstreamer相关工具集合
查看>>
RS232 四入四出模块控制代码
查看>>
gstreamer插件之 videotestsrc
查看>>
linux 驱动开发 头文件
查看>>
/etc/resolv.conf
查看>>
container_of()传入结构体中的成员,返回该结构体的首地址
查看>>
linux sfdisk partition
查看>>
ipconfig,ifconfig,iwconfig
查看>>
opensuse12.2 PL2303 minicom
查看>>
网络视频服务器移植
查看>>
Encoding Schemes
查看>>
移植QT
查看>>
如此调用
查看>>
计算机的发展史
查看>>
带WiringPi库的交叉编译如何处理一
查看>>
带WiringPi库的交叉笔译如何处理二之软链接概念
查看>>
Spring事务的七种传播行为
查看>>
ES写入找不到主节点问题排查
查看>>