Chinaunix首页 | 论坛 | 博客
  • 博客访问: 377828
  • 博文数量: 114
  • 博客积分: 0
  • 博客等级: 民兵
  • 技术积分: 1219
  • 用 户 组: 普通用户
  • 注册时间: 2015-02-07 21:23
文章分类

全部博文(114)

文章存档

2018年(1)

2017年(5)

2016年(87)

2015年(21)

我的朋友

分类: 网络与安全

2015-09-04 20:47:07


  1. 公司网络内部使用IP为10.1.1.0网段,外部地址范围为61.159.62.128到61.159.62.135
  2. 将内部网络地址10.1.1.0网段转换为合法的外部地址61.159.62.131,www端口映射到133外部地址,外部网络用户的ip是202.104.133.101,在外通过端口转换访问内部www服务器。
  3. 注意:模拟外部用户访问时转换的地址是61.159.62.133,访问时在浏览器上加ip跟端口号访问内网服务器。

  1. R2#show running-config
  2. Building configuration...


  3. Current configuration : 807 bytes
  4. !
  5. version 12.4
  6. no service timestamps log datetime msec
  7. no service timestamps debug datetime msec
  8. no service password-encryption
  9. !
  10. hostname R2
  11. !
  12. !

  13. spanning-tree mode pvst
  14. interface FastEthernet0/0
  15.  ip address 10.1.1.1 255.255.255.0
  16.  ip nat inside
  17.  duplex auto
  18.  speed auto
  19. !
  20. interface FastEthernet0/1
  21.  ip address 61.159.62.130 255.255.255.248
  22.  ip nat outside
  23.  duplex auto
  24.  speed auto
  25. !
  26. interface Vlan1
  27.  no ip address
  28.  shutdown
  29. !
  30. ip nat pool onlyone 61.159.62.131 61.159.62.135 netmask 255.255.255.248 #外部地址池为onlyone。
  31. ip nat inside source list 1 pool onlyone overload #overload表示地址复用,实现访问控制列表1中的局域地址转换为onlyone地址池的内部全局IP地址。
  32. ip nat inside source static tcp 10.1.1.3 80 61.159.62.133 80
  33. ip classless
  34. ip route 0.0.0.0 0.0.0.0 61.159.62.129 
  35. access-list 1 permit 10.1.1.0 0.0.0.255
  36. line con 0
  37. line aux 0
  38. line vty 0 4
  39.  login

  40. end
阅读(978) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~