取消
显示结果 
搜索替代 
您的意思是: 
cancel
11417
查看次数
0
有帮助
16
回复

2911映射问题

F22
Level 1
Level 1
大神 请教一下思科端口映射问题 2911的路由器下面直接接交换机 局域网内都可以正常上网 外网一个固定ip。1 做了映射 192.168.1.1 3389 10.1.1.1 3389 这样可以远程到1.1的桌面。但是改成192.168.1.1 3389 10.1.1.1 3390 只是把3389改成3390了 为什么就不能远程到1.1了? 求解答!!!
16 条回复16

CSCO12370587
Level 1
Level 1
重启试了吗,建议清一下映射表。或者看一下log

F22
Level 1
Level 1
CSCO12370587 发表于 2017-12-27 14:10
重启试了吗,建议清一下映射表。或者看一下log

路由器和服务器都重启了,故障依旧···

YilinChen
Spotlight
Spotlight
这么说吧,技术上肯定可以实现的,要想判断问题出在哪里,还是贴一下完整配置,比较好。

F22
Level 1
Level 1
YilinChen 发表于 2017-12-28 08:57
这么说吧,技术上肯定可以实现的,要想判断问题出在哪里,还是贴一下完整配置,比较好。

Router#show running-config
Building configuration...
Current configuration : 2161 bytes
!
! Last configuration change at 03:07:24 UTC Tue Dec 26 2017 by bj
!
version 15.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname Router
!
boot-start-marker
boot-end-marker
!
!
enable password
!
no aaa new-model
!
!
!
!
!
!
!
!
!
!
!
ip dhcp excluded-address 192.168.1.1 192.168.1.10
ip dhcp excluded-address 192.168.1.253
ip dhcp excluded-address 192.168.1.254
!
ip dhcp pool bj
network 192.168.1.0 255.255.255.0
default-router 192.168.1.254
dns-server 111.11.11.1
!
!
!
no ip domain lookup
ip cef
no ipv6 cef
!
multilink bundle-name authenticated
!
!
cts logging verbose
!
!
license udi pid CISCO2911/K9 sn FGL214190ML
!
!
username bj password 0 cisco
!
redundancy
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
interface Embedded-Service-Engine0/0
no ip address
shutdown
!
interface GigabitEthernet0/0
ip address 10.1.1.1 255.255.255.0
ip nat outside
ip virtual-reassembly in
duplex auto
speed auto
!
interface GigabitEthernet0/1
ip address 192.168.1.254 255.255.255.0
ip nat inside
ip virtual-reassembly in
duplex auto
speed auto
!
interface GigabitEthernet0/2
no ip address
shutdown
duplex auto
speed auto
!
ip forward-protocol nd
!
no ip http server
no ip http secure-server
!
ip nat inside source list 1 interface GigabitEthernet0/0 overload
ip nat inside source static tcp 192.168.1.1 3389 10.1.1.1 3390 extendable
ip route 0.0.0.0 0.0.0.0 10.1.1.2
!
!
!
access-list 1 permit 192.168.1.0 0.255.255.255
!
control-plane
!
!
!
line con 0
line aux 0
line 2
no activation-character
no exec
transport preferred none
transport output pad telnet rlogin lapb-ta mop udptn v120 ssh
stopbits 1
line vty 0 4
password cisco
login local
transport input telnet
!
scheduler allocate 20000 1000
!
end

cruiseluo
Spotlight
Spotlight
1、先配置成3389端口,让远程桌面能正常运行,在内网抓一下包,看看整个连接建立的流程,然后以此建立模板。
2、修改端口到3390,确认一下客户端远程到10.1.1.1时,客户端确实是访问的3390端口而不是之前的3389端口。
3、在内网抓一下包,看看192.168.1.1的3389端口是不是收到了客户端的请求,把这个流程和之前能够正常连接的流程做一下对比,看看有什么不同,然后确认问题出在哪里。

YilinChen
Spotlight
Spotlight
看配置没啥问题,show ip nat translations 看看 映射状态对不对,另,抓包是个好办法。

F22
Level 1
Level 1
cruiseluo 发表于 2017-12-28 11:06
1、先配置成3389端口,让远程桌面能正常运行,在内网抓一下包,看看整个连接建立的流程,然后以此建立模板 ...

你好 我按照你的方法做了 第一次用3389成功远程桌面后 可以看到并捕捉到抓包信息 而且信息正确
但我改了端口后 在抓包 客户端显示不能远程连接 内网抓包根本抓不到

cruiseluo
Spotlight
Spotlight
F22 发表于 2017-12-28 14:54
你好 我按照你的方法做了 第一次用3389成功远程桌面后 可以看到并捕捉到抓包信息 而且信息正确
但我改了 ...

如果有条件的话可以在2911的10.1.1.1那个端口上接台交换机,然后做端口映射,抓一下包,看看客户端的请求过来没有,如果请求都是正确的,就按照上面说的看看nat translation

cruiseluo
Spotlight
Spotlight
F22 发表于 2017-12-28 14:54
你好 我按照你的方法做了 第一次用3389成功远程桌面后 可以看到并捕捉到抓包信息 而且信息正确
但我改了 ...

如果有条件的话可以在2911的10.1.1.1那个端口上接台交换机,然后做端口映射,抓一下包,看看客户端的请求过来没有,如果请求都是正确的,就按照上面说的看看nat translation

F22
Level 1
Level 1
YilinChen 发表于 2017-12-28 12:14
看配置没啥问题,show ip nat translations 看看 映射状态对不对,另,抓包是个好办法。

Router#show ip nat translations
Pro Inside global Inside local Outside local Outside global
tcp 10.1.1.1:3390 192.168.1.1:3389 --- ---
tcp 10.1.1.1:10085 192.168.1.1:10085 --- ---
tcp 10.1.1.1:10087 192.168.1.1:10087 --- ---
tcp 10.1.1.1:10088 192.168.1.1:10088 --- ---
tcp 10.1.1.1:49637 192.168.1.1:49637 217.146.8.3:443 217.146.8.3:443

F22
Level 1
Level 1
cruiseluo 发表于 2017-12-28 18:29
如果有条件的话可以在2911的10.1.1.1那个端口上接台交换机,然后做端口映射,抓一下包,看看客户端的请求 ...

Router#show ip nat translations
Pro Inside global Inside local Outside local Outside global
tcp 10.1.1.1:3390 192.168.1.1:3389 --- ---
tcp 10.1.1.1:10085 192.168.1.1:10085 --- ---
tcp 10.1.1.1:10087 192.168.1.1:10087 --- ---
tcp 10.1.1.1:10088 192.168.1.1:10088 --- ---
tcp 10.1.1.1:49637 192.168.1.1:49637 217.146.8.3:443 217.146.8.3:443

YilinChen
Spotlight
Spotlight
本帖最后由 YilinChen 于 2017-12-29 13:12 编辑
ACL看着有问题:
access-list 1 permit 192.168.1.0 0.255.255.255

YilinChen
Spotlight
Spotlight
特别拿模拟器测试了下:,有数据通信时,正常的 nat translations 会是这样:
R2#show ip nat translations
Pro Inside global Inside local Outside local Outside global
tcp 10.1.1.1:3390 192.168.1.1:3389 10.1.1.2:60547 10.1.1.2:60547
tcp 10.1.1.1:3390 192.168.1.1:3389 --- ---
debug了一下,确认数据包可以到达 192.168.1.1
*Mar 1 00:14:36.107: IP: s=10.1.1.2 (FastEthernet0/0), d=192.168.1.1 (FastEthernet0/0), len 44, rcvd 3
*Mar 1 00:14:36.107: TCP src=60547, dst=3389, seq=1129949271, ack=0, win=4128 SYN
*Mar 1 00:14:36.107: IP: tableid=0, s=192.168.1.1 (local), d=10.1.1.2 (FastEthernet0/0), routed via FIB
*Mar 1 00:14:36.107: IP: s=192.168.1.1 (local), d=10.1.1.2 (FastEthernet0/0), len 40, sending
*Mar 1 00:14:36.107: TCP src=3389, dst=60547, seq=0, ack=1129949272, win=0 ACK RST
看LZ贴的,有公网IP来访问,建议再查一下路由表,或是以10.1.1.2 这台设备做为源,telnet 10.1.1.1 3390 测试下。

13nash
Level 8
Level 8
关键你外面通过怎样的方式访问?mstsc?
入门指南

使用上面的搜索栏输入关键字、短语或问题,搜索问题的答案。

我们希望您在这里的旅程尽可能顺利,因此这里有一些链接可以帮助您快速熟悉思科社区:









快捷链接