EasyVpn简单配置实例_职场

环境:路由器(cisco)easyServer在一个公司的总部为EZ×××的server,远程internet用户要访问总部的内网,远程用户用的是cisco的EZ×××软件。
要求:配置server端,并在client端拨到总部,能够访问内网webserver
移动×××技术:Easy ×××
  从Easy ×××的名字上就知道这应该是个简单的×××应用技术。Easy ×××分为Easy ××× Server和Easy ××× Remote两种。Easy ××× Server是Remote-Access ×××专业设备,配置复杂,支持Policy Pushing等特性。现在的900、1700、Pix、Vpn 3002和ASA等很多设备都支持。
Easy ××× Remote就是专门为了小的分支机构所设计的,一般情况下,小分支接口的网络管理员的水平没有那么高,不可能去配置一堆复杂命令来实现Site-to-Site ×××,这时候,只需要通过Easy ××× Remote这个特性配置几条简单的命令,就可以Site-to-Site ×××。所有的配置都在Server端来完成,Client的×××配置都由Server端采用“推”的方式应用到分支机构的设备上。这种技术极大地避免了分支机构配置×××失败的问题。但这种×××不支持路由,不支持组播,只能在IP协议下工作,不支持状态故障切换等技术
所以,需要网络管理员在自己的实际工作中留意这些功能是否需要,再决定是否实施Easy ×××技术。
Client配置很简单,只要配置个PAT,然后能与互联网连通。
 
interface FastEthernet0/0
 ip address 192.168.1.254 255.255.255.0
 ip nat inside
 
interface FastEthernet1/0
 ip address 202.100.1.1 255.255.255.0
 ip nat outside
ip route 0.0.0.0 0.0.0.0 202.100.1.10
!
ip nat inside source list pat interface FastEthernet1/0 overload
!
!
ip access-list extended pat
 permit ip 192.168.1.0 0.0.0.255 any
 
主要是easyserver配置,具体如下:
aaa new-model         启动3A认证,默认是关闭的
aaa authentication login noauth line none     line线下不需要认证
aaa authentication login easyvpn local      登录验证列表名为easyvpn,本地数据库
aaa authorization network easyvpn local   授权访问列表名字为esayvpn,本地数据库
username cisco password 0 cisco          用于验证的用户名和密码
 
crypto isakmp policy 10           定义IKE1阶段策略  
 encr 3des                       客户端只支持3DES
 authentication pre-share         使用预共享密钥
 group 2                       客户端只支持group 2
 
crypto isakmp client configuration group zhang     客户端组的配置,也是定义IKE1.5阶段策略
 key zhang                预共享密钥
 pool easyvpn              加载地址池
 acl easyvpn                加载隧传分离列表
 
crypto ipsec transform-set cisco esp-3des esp-sha-hmac 定义IKE2阶段的转换集
 
 
crypto dynamic-map cisco 1      定义动态加密映射,客户端不固定
 set transform-set cisco           将转换集加载
 reverse-route                  反向路由注入,客户到server,server会生成一条静态路由列表
 
crypto map cisco client authentication list easyvpn 扩展验证使用easyvpn
crypto map cisco isakmp authorization list easyvpn 授权使用easyvpnAAA列表
crypto map cisco client configuration address respond 向客户端推送配置
crypto map cisco 1 ipsec-isakmp dynamic cisco      将动态映射到静态映射 
 
interface FastEthernet2/0
 ip address 202.100.2.1 255.255.255.0
 ip nat outside
 crypto map cisco
interface FastEthernet3/0
 ip address 172.16.1.254 255.255.255.0
 ip nat inside
 
ip local pool easyvpn 10.1.1.1 10.1.1.10    推送给拨上来用户的地址池
 
ip route 0.0.0.0 0.0.0.0 202.100.2.10
ip nat inside source list pat interface FastEthernet2/0 overload
 
ip access-list extended easyvpn
 permit ip 172.16.1.0 0.0.0.255 any     定义列表
ip access-list extended pat
 permit ip 172.16.1.0 0.0.0.255 any      PAT列表
 
 
line con 0
 exec-timeout 0 0
 logging synchronous
 login authentication noauth
line aux 0
line vty 0 4
 login authentication noauth
 
接下来,客户端PC的配置(使用cisco vpn client软件)
1、安装好的软件,打开,点击new新建,输入组名和密码及server地址
 

EasyVpn简单配置实例_休闲_02

2、建好后,点击连接,提示输入用户名和密码,此为扩展认证
 

EasyVpn简单配置实例_休闲_03

 

3、点击OK,如果成功,所有的框消失
 

EasyVpn简单配置实例_职场_04

 
4、在PC上查看地址,server是否分配过来了地址
 
 
C:\Documents and Settings\Administrator>ipconfig
 
Windows IP Configuration
 
 
Ethernet adapter 本地连接:
 
        Connection-specific DNS Suffix . :
        IP Address. . . . . . . . . . . . : 192.168.1.10
        Subnet Mask . . . . . . . . . . . : 255.255.255.0
        Default Gateway . . . . . . . . . : 192.168.1.254
 
Ethernet adapter 本地连接 2:
 
        Connection-specific DNS Suffix . :
        IP Address. . . . . . . . . . . . : 10.1.1.3         这里我已经是第三次登陆了,所以是分配的10.1.1.3,第一次是10.1.1.1
        Subnet Mask . . . . . . . . . . . : 255.0.0.0
        Default Gateway . . . . . . . . . :
5、已经ping通过INTERNET到了总部内网的地址
 
 
C:\Documents and Settings\Administrator>ping 172.16.1.10
 
Pinging 172.16.1.10 with 32 bytes of data:
 
Reply from 202.100.2.1: bytes=32 time=131ms TTL=127
Reply from 202.100.2.1: bytes=32 time=80ms TTL=127
Reply from 202.100.2.1: bytes=32 time=60ms TTL=127
Reply from 202.100.2.1: bytes=32 time=100ms TTL=127
 
Ping statistics for 172.16.1.10:
    Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 60ms, Maximum = 131ms, Average = 92ms
 
 
C:\>route print   à查看PC端的路由
===========================================================================
Interface List
0x1 ........................... MS TCP Loopback interface
0x2 ...00 0c 29 a3 1b d8 ...... AMD PCNET Family PCI Ethernet Adapter - 数据包
划程序微型端口
0x30004 ...00 05 9a 3c 78 00 ...... Cisco Systems ××× Adapter - 数据包计划程序
型端口
===========================================================================
===========================================================================
Active Routes:
Network Destination        Netmask          Gateway       Interface Metric
          0.0.0.0          0.0.0.0    192.168.1.254    192.168.1.10       10
         10.0.0.0        255.0.0.0         10.1.1.3        10.1.1.3       10
         10.1.1.3 255.255.255.255        127.0.0.1      127.0.0.1       10
   10.255.255.255 255.255.255.255         10.1.1.3        10.1.1.3       10
        127.0.0.0        255.0.0.0        127.0.0.1       127.0.0.1       1
       172.16.1.0    255.255.255.0         10.1.1.3        10.1.1.3       1
      192.168.1.0    255.255.255.0     192.168.1.10    192.168.1.10       10
     192.168.1.10 255.255.255.255        127.0.0.1       127.0.0.1       10
    192.168.1.255 255.255.255.255     192.168.1.10    192.168.1.10       10
      202.100.2.1 255.255.255.255    192.168.1.254    192.168.1.10       1
        224.0.0.0        240.0.0.0         10.1.1.3        10.1.1.3       10
        224.0.0.0        240.0.0.0     192.168.1.10    192.168.1.10       10
  255.255.255.255 255.255.255.255         10.1.1.3        10.1.1.3       1
 255.255.255.255 255.255.255.255     192.168.1.10    192.168.1.10       1
Default Gateway:     192.168.1.254
===========================================================================
Persistent Routes:
 None    这就是由对端组设置推送来的隧传分离列表
 
查看两个阶段的关联
Easyserver#sh crypto isakmp sa
dst             src             state          conn-id slot status
202.100.2.1     202.100.1.1     QM_IDLE              2    0 ACTIVE
 
Easyserver#sh crypto ipsec sa
 
interface: FastEthernet2/0
    Crypto map tag: cisco, local addr 202.100.2.1
 
   protected vrf: (none)
   local ident (addr/mask/prot/port): (0.0.0.0/0.0.0.0/0/0)
   remote ident (addr/mask/prot/port): (10.1.1.3/255.255.255.255/0/0)
   current_peer 202.100.1.1 port 1095
     PERMIT, flags={}
    #pkts encaps: 4, #pkts encrypt: 4, #pkts digest: 4
    #pkts decaps: 4, #pkts decrypt: 4, #pkts verify: 4
    #pkts compressed: 0, #pkts decompressed: 0
    #pkts not compressed: 0, #pkts compr. failed: 0
    #pkts not decompressed: 0, #pkts decompress failed: 0
    #send errors 0, #recv errors 0
 
     local crypto endpt.: 202.100.2.1, remote crypto endpt.: 202.100.1.1
     path mtu 1500, ip mtu 1500, ip mtu idb FastEthernet2/0
     current outbound spi: 0xDF3D6497(3745342615)
 
     inbound esp sas:
      spi: 0x1254F8BB(307558587)
        transform: esp-3des esp-sha-hmac ,
        in use settings ={Tunnel UDP-Encaps, }
        conn id: 2002, flow_id: SW:2, crypto map: cisco
        sa timing: remaining key lifetime (k/sec): (4439127/2913)
        IV size: 8 bytes
        replay detection support: Y
        Status: ACTIVE
 
     inbound ah sas:
 
     inbound pcp sas:
 
     outbound esp sas:
      spi: 0xDF3D6497(3745342615)
        transform: esp-3des esp-sha-hmac ,
        in use settings ={Tunnel UDP-Encaps, }
        conn id: 2001, flow_id: SW:1, crypto map: cisco
        sa timing: remaining key lifetime (k/sec): (4439127/2911)
        IV size: 8 bytes
        replay detection support: Y
        Status: ACTIVE
 
实验完毕!!!