- 积分
- 531
- 鸿鹄币
- 个
- 好评度
- 点
- 精华
- 最后登录
- 1970-1-1
- 阅读权限
- 40
- 听众
- 收听
中级工程师
   
|
20鸿鹄币
本帖最后由 ji1986222 于 2013-5-16 09:39 编辑
现在情况是,公司PC可以上网,内网也可以互访,但是做了端口映射的这个地址不能通过外网访问,不知道什么原因。求大神解答~
需求:通过外网124.65.126.78:8081访问内网192.168.1.11:8081服务器
配置如下:
!
boot-start-marker
boot-end-marker
!
!
logging buffered 51200 warnings
!
no aaa new-model
clock timezone GMT 8 0
!
no ipv6 cef
ip source-route
ip cef
!
interface Embedded-Service-Engine0/0
no ip address
shutdown
!
interface GigabitEthernet0/0
description lan_port
ip address 192.168.1.254 255.255.255.0
ip nat inside
ip virtual-reassembly in
duplex auto
speed auto
!
interface GigabitEthernet0/1
description wan_port
ip address 124.65.126.78 255.255.255.252
ip nat outside
ip virtual-reassembly in
duplex auto
speed auto
!
ip forward-protocol nd
!
ip http server
ip http authentication local
ip http secure-server
ip http timeout-policy idle 60 life 86400 requests 10000
!
ip nat inside source list 1 interface GigabitEthernet0/1 overload
ip nat inside source static tcp 192.168.1.11 8081 124.65.126.78 8081 extendable
ip nat inside source static udp 192.168.1.11 8081 124.65.126.78 8081 extendable
ip nat inside source static tcp 192.168.1.11 8081 124.65.126.78 8082 extendable
ip nat inside source static udp 192.168.1.11 8081 124.65.126.78 8082 extendable
ip nat inside source static tcp 192.168.1.11 9999 124.65.126.78 9999 extendable
ip nat inside source static udp 192.168.1.11 9999 124.65.126.78 9999 extendable
ip route 0.0.0.0 0.0.0.0 124.65.126.77
!
access-list 1 permit 192.168.1.0 0.0.0.255
!
!
!
control-plane
!
|
最佳答案
查看完整内容
我上面不说了么 内网去访问服务器就把包丢给路由器 路由器一看是自己本网段的就直接丢给服务器 但是服务器必须要通过公网地址才能访问 所以内网不行外网就可以 这是我查找的资料
为什么TP可以思科不可以好像是种回流机制 可能思科版本低了 可能就是不行 我也不清楚了
解决我也说了 我用模拟器模拟了下 你申请个域名 内外网就直接敲域名好像可以解决 或者内网直接敲服务器的内网IP看看
|