配置路由器作为ezVPN服务器
1.启用AAA
aaa new-model 启用AAA
aaa authentication login vpnauth local 建立一个叫做vpnauth的认证组使用路由器本地用户名密码做登录认证
aaa authorization network vpnauthor local 建立一个叫做vpnauthor的授权组用来给vpn拨入用户分配地址使用
username cisco password cisco 建立一个本地用户cisco密码为cisco作为vpn用户
2.配置phase 1
crypto isakmp policy 10
encr aes 使用AES加密
authentication pre-share 使用预共享密钥
group 2 使用DH group2
3.配置"phase 1.5" (xauth)
crypto isakmp xauth timeout 10 设置xauth认证超时时间10秒
crypto isakmp client configuration group vpngroup 建立一个ezvpn的组,组名为vpngroup
key groupkey 组密码为groupkey
pool localpool针对改组分配ip的地址池为localpool
acl lo 针对该组的split tunnel acl
crypto isakmp profile isapro 建立一个isakmp profile,使用profile的好处是可以针对不同的组采用不同的认证和授权策略
match identity group vpngroup 该profile对应的组为vpngroup
client authentication list vpnauth 针对客户端使用vpnauth进行认证
isakmp authorization list vpnauthor 针对客户端使用vpnauth进行授权(针对该配置是地址的分配)
client configuration address respond 回应客户端发起的地址请求,针对新版的cisco vpn client通常都使用respond方式
keepalive 10 retry 3 保持10秒,最多重试认证3次
ip local pool localpool 9.9.9.1 9.9.9.10建立一个本地地址池
4.配置phase 2
crypto ipsec transform-set ts esp-aes esp-sha-hmac建立转换集使用aes加密和sha hash验证
!
crypto dynamic-map dmap 10 建立动态map
set transform-set ts 调用转换集ts
set isakmp-profile isapro 调用isakmp-profile
reverse-route 当客户端拨入后在路由器上注入客户端的静态主机路由
!
!
crypto map cmap 1000 ipsec-isakmp dynamic dmap 建立一个静态map并且调用刚建立的动态map dmap
在vpn拨入请求可能进入的接口上调用crypto map cmap
5.使用VPN客户端连接
组名使用vpngroup,组密码使用groupkey。用户名使用cisco,密码使用cisco。