H3C总代理商,华为代理商欢迎您!

全国咨询服务电话

15378180513 

企业新闻

联系我们

客户至上

成都达锐斯科技有限公司
地址:成都市武候区人民南路4段53号嘉云台丙栋7楼

电话:15378180513

联系人:

邮箱:3511891@qq.com

官网:http://www.cdh3c.com

企业新闻

当前位置: 首页>>企业新闻

Cisco 路由器上手工方式VPN的实现

  1、IPSec手工方式的注意事项:

  (1)加密通道一旦建立,就不再断开

  (2)Manual Key不提供anti-replay的功能

  (3)在Manual Key方式时,access-list中只有1条permit起作用,其他都被忽略。

  (4)在Manual Key方式下,两边的transform set的名字必须一样。

  2、VPN手工方式需要的主要命令:

  (1)access-list

  设置access-list,有对符合什么样条件的IP包进行加密。

  (2)crypto isakmp

  默认是使用crypto isakmp方式,所以在手工方式下,需要禁止此选项。

  (3)crypto ipsec

  配置IPSec的加密方式,选择manual方式

  (4)crypto map

  配置IPSec的加密方式

  a)set peer

  设置远程VPN网关

  b)set security-association

  设置安全联盟,主要有inbound和outbound

  c)set transform-set

  设置加密形式

  d)match address

  对匹配access-list的进行加密。

  3、VPN的手工实现方式:

  (1)配置access-list,对哪些包建立VPN连接。

  access-list 101 permit ip host 192.168.0.1 host

  192.168.1.1

  (2)取消VPN的自动协商方式

  no crypto isakmp enable

  (3)建立一个IPSec的封装方式—两边的路由器需要一样的名称。在举例中是encry-des

  crypto ipsec transform-set encry-desesp-des

  (4)建立一个VPN连接需要的各种条件—这里是ipsec-manual方式

  crypto map vpntest 8 ipsec-manual

  (5)在上一步用crypto map进入crypto配置模式

  a) 配置远程的VPN网关

  set peer 202.106.185.2

  b) 配置进出的安全联盟

  set security-association inbound esp 1000 cipher 21 authenticator 01

  配置入境联盟 加密方式 顺序号

  set security-association outbound esp 1001 cipher 12 authenticator 01

  c)设置IPSec的加密方式

  set transform-set encry-des

  d)对匹配地址进行加密

  match address 101

  (6)在路由器外部网口上绑定加密方式

  int e 0/1

  ip addr 202.106.185.1 255.255.255.0

  crypto map vpntest

  4、注意事项

  (1)在两端的access-list要互为相反,如在A路由器上写:

  access-list 101 permit ip host 192.168.0.1 host 192.168.1.1

  则在B路由器上写:

  access-list 101 permit ip host 192.168.1.1 host 192.168.0.1

  (2)在两端的transform set名称要一致

  如都写crypto ipsec transform-set encry-des esp-des

  (3)在一端的inbound就是另一端的outboud,一端的outbound是另一端的inboud。因

  此他们的序列好应该相反。

  如在A路由器上写:

  set security-association inbound esp 1000 cipher 21 authenticator 01

  set security-association outbound esp 1001 cipher 12 authenticator 01

  则在B路由器上写:

  set security-association inbound esp 1001 cipher 12 authenticator 01

  set security-association outbound esp 1000 cipher 21 authenticator 01

  (4)总之在使用手工方式时,在两端的配置应该尽量一样或相对。

  5、应用条件

  我认为在路由器上做VPN主要有以下几种应用:

  (1)可以使用在电信中二级节点和一级节点进行远程管理认证时使用。而一级节点和骨

  干节点由于通讯量比较大,不建议使用VPN方式。而且为了减低负载只有在传输特殊应用时建

  议使用VPN,不是只是简单地判断Source IP,Destination IP。

  (2)移动用户在跟自己公司的服务器进行连接时使用。

  (3)对于分公司、母公司这种形式在相互通信过程中使用。

  6、用VPN的好处

  (1)节约成本,因为不要在做大量投资,购买专业设备,只需用现有的路由器即可。

  (2)实现了加密,保证重要数据在传输过程中的安全性。

  (3)灵活性强。如果用户通过路由器接入Internet,则可以自己配置保证安全性。不过

  对于ISP来说用处不大。

  7、VPN应用举例:

  在路由器R1上配置如下:

  no crypto isakmp enable

  crypto ipsec transform-set encry-des esp-des

  crypto map vpntest 8 ipsec-manual

  set peer 202.106.185.2

  set security-association inbound esp 1000 cipher 21 authenticator 01

  set security-association outbound esp 1001 cipher 12 authenticator 01

  set transform-set encry-des match address 101

  interface Ethernet0/0

  ip address 192.168.0.1 255.255.255.0

  interface Ethernet0/1

  ip address 202.106.185.1 255.255.255.0

  crypto map vpntest

  ip route 0.0.0.0 0.0.0.0 202.106.185.2

  access-list 101 permit ip host 192.168.0.1 host 192.168.1.1

  在路由器R2上配置如下:

  no crypto isakmp enable

  crypto ipsec transform-set encry-des esp-des

  crypto map vpntest 8 ipsec-manual set peer 202.106.185.1

  set security-association inbound esp 1001 cipher 12 authenticator 01

  set security-association outbound esp 1000 cipher 21 authenticator 01

  set transform-set encry-des match address 101

  interface Ethernet0/0

  ip address 192.168.1.1 255.255.255.0

  interface Ethernet0/1

  ip address 202.106.185.2 255.255.255.0

  crypto map vpntest

  ip route 0.0.0.0 0.0.0.0 202.106.185.1

  access-list 101 permit ip host 192.168.1.1 host 192.168.0.1

  IKE方式的实现

  1、IKE使用UPD 500

  2、支持CA

  3、支持移动用户

  IKE包括的组件:

  1、DES

  2、Diffie-Hellman-preshare key

  3、RSA signatures(CA)and RSA encrypted nonces

  IKE配置内容:

  1、enable IKE—default enable

  2、accesslist

  3、transformset

  4、crypto map

  5、binding interface

  IKE Policy—两边的号码可以不一样,匹配:

  authentication、hash、diff-herman、encrytpion,lifetime(取较小值)

  1、authentication

  (1)RSA signature

  (2)RSA non

  (3)Preshare Key

  2、encryption

  IKE配置

  (1)配置accesslist

  (2)crypto isakmp enable(默认打开,但为了避免,还是写上)

  (3)crypto isakmp policy 10

  a)encryption algorithm:DES

  b)hash algorithm:SHA1

  c)authentication method:RSA sig

  d)Diffie-Hellman group:1

  e)Lifetime:86400

  (4)crypto isakmp key test address 202.106.100.2

  (5)crypto ipsec transform-set set2 ah-sha-hmac

  esp-des esp-sha-hmac

  (6)crypto map IKE ipsec-isakmp

  a)set peer remote IP

  b)set transform-set

  c)set pfs group2

  d)match address

  (7)dir

  使用RSA的-encr方式

  ip domain-name

  crypto key generate rsa

  sh crypto key mypubkey rsa

  crypto key pubkey-chain rsa

  key-string

友情链接

新华三集团 思科

公司地址

ADDRESS

成都市武候区人民南路4段53号嘉云台丙栋7楼

服务电话

HOTTELEPHONE
  • 15378180513
公司简介
产品展示
H3C交换机
H3C路由器
思科交换机
思科路由器
华为交换机
企业新闻
技术文档
  • 扫一扫,加微信

Copyright © 2023 达锐斯科技 川公网安备 51010802000119号 XML地图

蜀ICP备2020034250号-1 技术支持: 网站模板