A-A+

H3C路由器之NAT+端口映射实战

2016年01月04日 站长资讯 暂无评论

实践环境就一台H3C路由器外网接Internet,新联通的静态IP接入。内网直联非网管交换机。

具体的配置命令行如下:

  1. [RouterGate]display current-configuration  
  2. #  
  3. sysname RouterGate       //路由器的名字  
  4. cpu-usage cycle 1min  
  5. #  
  6. radius scheme system  
  7. #  
  8. domain system  
  9. #  
  10. local-user root       //远程登录的用户名 www.xiaoxiongboke.com  
  11. password simple xxxxxx     //远程登录的明文密码  
  12. service-type telnet terminal  
  13. level 3    //远程登录的权限等级(0-3)3是最高权限   
  14. #  
  15. acl number 2001     //定义ACL2001(2000-2999是基本ACL)  
  16. rule 0 permit source 192.168.1.0 0.0.0.255       //ACL的0号规则允许源地址的网段访问  
  17. #  
  18. interface Aux0  
  19. async mode flow  
  20. #  
  21. interface Ethernet0/0                                           
  22. description LAN                                                 
  23.   
  24. ip address 192.168.1.1 255.255.255.0                  
  25. #  
  26. interface Ethernet0/1                       
  27. description ISP  
  28. ip address 218.xx.yy.34 255.255.255.252    //xx和yy处是为此公司地址保密  
  29. nat outbound 2001       // 绑定的ACL2001可以访问出去  
  30. nat server protocol tcp global 218.xx.yy.34 www inside 192.168.1.4 www    //开启端口映  
  31. nat server protocol tcp global 218.xx.yy.34 ftp inside 192.168.1.4 ftp   //射到.4服务器  
  32. #  
  33. interface NULL0  
  34. #  
  35. FTP server enable  
  36. #  
  37. ip route-static 0.0.0.0 0.0.0.0 218.xx.yy.33 preference 60         //默认路由  
  38.   
  39. user-interface con 0  
  40. user-interface aux 0  
  41. user-interface vty 0 4    //设置vty登录  
  42. authentication-mode scheme  
  43. user privilege level 3    //用户权限   
  44. set authentication password simple xxxxxx   //明文密码  
  45. #  
  46. return  
标签:

给我留言