nat static protocol tcp:指定这是一个基于TCP协议的静态NAT映射。 global current-interface 9999:指定全局(外部)IP地址和端口。current-interface意味着使用当前接口(通常是WAN接口)的IP地址,而9999是外部访问时使用的端口号。 inside 192.168.3.123:指定内部(私有)IP地址,即当外部请求到达指定端口时,流量将被转发到...
2000 //配置NAT Outbound,对FTP服务器隐藏外网用户的真实IP地址,以接口GE1/0/0的IP地址体现 # interface GigabitEthernet2/0/0 ip address 1.1.1.1 255.255.255.0 nat static global current-interface inside 2.2.2.2 //配置NAT Static,对外网用户隐藏FTP服务器的真实IP地址,以接口GE2/0/0的IP地址体现 # ...
nat static(接口视图) 命令功能 nat static命令用来配置私网IP地址和公网IP地址的静态映射关系。 undo nat static命令用来删除私网IP地址和公网IP地址的静态映射关系。 缺省情况下,未配置私网IP地址和公网IP地址的静态映射关系。 命令格式 nat staticprotocol{tcp|udp}global{global-address|current-interface|interface...
ip route-static 0.0.0.0 0.0.0.0 12.1.1.6(默认路由指向外网) interface GigabitEthernet0/0/1 ip address 12.1.1.1 255.255.255.248 nat static global 12.1.1.2 inside 192.168.1.30 netmask 255.255.255.255(将公网地址12.1.1.2映射到内外地址192.168.1.30) 2.动态NAT(多对多 不转换端口): 当pc或终端需要上网...
interface GigabitEthernet0/0/1 ip address 2.2.2.1 255.255.255.0 nat static protocol tcp global current-interface ftp inside 2.2.2.2 ftp netmask 255.255.255.255 nat static global current-interface inside 2.2.2.2 //配置NAT Static,对外网用户隐藏FTP服务器的真实IP地址,以接口GE2/0/0...
nat server protocol tcp global current-interface <外网端口> inside <私网IP> <内网端口> #比如访问 接口IP:8080 --> 192.168.10.100:80 ACL 访问控制列表 作用:过滤经过接口的数据包,根据规则要么允许/放通 数据包,要么拒绝/丢弃 数据包 ACL的工作原则: ...
nat server protocol tcp global current-interface 8080 inside 10.1.1.1 www ;在连接公网接口上的端口将私网服务器地址和外网接口做一对绑定 nat server protocol tcp global current-interface 2121 inside 10.1.1.2 ftp ;在连接公网接口上的端口将私网服务器地址和外网接口做一对绑定...
interface interface-type interface-number(3) 配置普通内部服务器。请至少选择其中一项进行配置。¡ 外网地址单一,未使用外网端口或外网端口单一。nat server [ protocol pro-type ] global { global-address | current-interface | interface interface-type interface-number } [ global-port ] [ vpn-instance ...
直接在接口上声明nat static [R1]int g0/0/1 外网口 [R1-GigabitEthernet0/0/1]nat static global 20.0.0.10 inside 192.168.10.10 [R1]dis nat static 查看NAT静态配置信息 [R1]int g0/0/1 [R1-GigabitEthernet0/0/0]ip add 192.168.10.1 24 ...
nat server [ protocol protocol-number icmp |tcp|udpglobal global-address current-interface global-port inside {host-address host-port } vpn-instance vpn-instance-name acl acl-number description description ]命令用来定义一个内部服务器的映射表,外部用户可以通过公网地址和端口来访问内部服务器。