20 février 2014

Cisco IPsec Easy VPN Configuration

Cisco Easy VPN is a convenient method to allow remote users to connect to your network using IPsec VPN tunnels. The advantage of Easy VPN is that you don’t have to worry about all the IPSEC security details on the client side. Just configure the remote router, group name, username /password and you are ready to go. In this tutorial I’ll show you how to configure Easy VPN on a Cisco IOS router and we’ll use the Cisco VPN client to setup the connection.
This is the topology that we’ll be using:
Cisco easy VPN demo topology
A single router configured for Easy VPN and a computer running Cisco’s VPN client software. Let’s start with the router configuration!

Router Configuration

First we need to enable AAA for authentication, authorization and accounting. We can use this for local authentication (usernames and passwords on the router) or use an external RADIUS server for this.
Be aware that once you enable AAA that your authentication settings of the console and VTY lines are now controlled by AAA. Make sure you don’t lock yourself out of the router or accidently allow VPN users to access your router.
For simplicity, we’ll use local authentication.
VPN(config)#aaa authentication login default local
VPN(config)#aaa authentication login VPNUSER local
VPN(config)#aaa authorization exec default local
VPN(config)#aaa authorization network VPNGROUP local
The username will be “VPNUSER” and we will use a group called “VPNGROUP”. Let’s configure a password for this user:
VPN(config)#username VPNUSER password CISCO
Our next move is to configure the IKE policy. This is where you set parameters that are used at the IKE negotiation.
VPN(config)#crypto isakmp policy 1
VPN(config-isakmp)#authentication pre-share
VPN(config-isakmp)#encryption aes
VPN(config-isakmp)#group 2
We’ll use AES encryption and diffie hellman group 2. To keep it simple we’ll use a pre-shared key.
For the VPN group we’ll have to configure a number of items. First of all there’s a password but you can also specify some client specific parameters like a DNS server, WINS server, how many users are able to connect etc. Here’s how to do it:
VPN(config)#crypto isakmp client configuration group VPNGROUP
VPN(config-isakmp-group)#key 0 CISCO
VPN(config-isakmp-group)#dns 192.168.1.253
VPN(config-isakmp-group)#wins 192.168.1.253
VPN(config-isakmp-group)#pool VPNPOOL
VPN(config-isakmp-group)#max-users 10
VPN(config-isakmp-group)#netmask 255.255.255.0
VPN(config-isakmp-group)#domain NETWORKLESSONS.LOCAL
The VPN group will use “CISCO” as the password and IP address 192.168.1.253 for the DNS and WINS server. The pool name is called VPNPOOL and this is where we’ll specify the IP addresses for our VPN users:
VPN(config)#ip local pool VPNPOOL 192.168.2.100 192.168.2.200
I’m using subnet 192.168.2.100 for the VPN users. This is a different subnet as our LAN (192.168.1.0 /24).
The next step is to configure a transform-set. This is where we configure our phase 2 authentication and encryption settings:
VPN(config)#crypto ipsec transform-set TRANSFORMSET esp-aes esp-sha-hmac
The transform-set is called “TRANSFORMSET” and we will use AES encryption and SHA for data origin authentication and integrity protection. Now we’ll configure an ISAKMP profile for our VPN group:
VPN(config)#crypto isakmp profile ISAKMPPROFILE
VPN(conf-isa-prof)#match identity group VPNGROUP
VPN(conf-isa-prof)#client authentication list VPNUSER
VPN(conf-isa-prof)#isakmp authorization list VPNGROUP
VPN(conf-isa-prof)#client configuration address respond
VPN(conf-isa-prof)#virtual-template 1
And create a VPN profile that refers to the transform-set and ISAKMP profile that we just created:
VPN(config)#crypto ipsec profile VPNPROFILE
VPN(ipsec-profile)#set transform-set TRANSFORMSET
VPN(ipsec-profile)#set isakmp-profile ISAKMPPROFILE
Last but not least we’ll attach the configuration that we did to a virtual interface which receives the connections from the VPN clients. Instead of configuring an IP address on this interface we’ll tell it to use the IP address of the FastEthernet 0/1 (LAN) interface:
VPN(config)#interface virtual-template 1 type tunnel
VPN(config-if)#ip unnumbered fa0/1
VPN(config-if)#tunnel mode ipsec ipv4
VPN(config-if)#tunnel protection ipsec profile VPNPROFILE
This is all we have to do on the router so we can now test our configuration on the client.
When your router is also configured for NAT, don’t forget to configure your access-list so your VPN traffic is not translated when it leaves the router.

Client Configuration

We already did the hard work on the router so the client side is pretty straightforward. Create a new profile and enter the group name and password that we just configured:
cisco vpn client profile properties
Once you hit save and try to connect the router will ask you for your credentials:
Cisco VPN Client User AuthenticationEnter your username and password, hit OK and you will be connected! I hope this tutorial has been helpful to you, if you have any questions feel free to leave a comment!

2 commentaires :

  1. Belle solution pour la configuration VPN .
    top10-bestvpn.com

    RépondreSupprimer
  2. Merci.
    Cette configuration fonctionne très bien.
    Ce poste a vraiment aidé avec la solution.
    10webhostingservice.com

    RépondreSupprimer