Configuring A VPN Using Easy VPN And An IPSec Tunnel

Transcription

Configuring a VPN Using Easy VPN and an IPSecTunnelThis chapter provides an overview of the creation of Virtual Private Networks (VPNs) that can be configuredon the Cisco 819, Cisco 860, and Cisco 880 series Integrated Services Routers (ISRs). Configuring a VPN Using Easy VPN and an IPSec Tunnel, page 1 Configuring the IKE Policy, page 3 Configuring Group Policy Information, page 5 Applying Mode Configuration to the Crypto Map, page 6 Enabling Policy Lookup, page 7 Configuring IPSec Transforms and Protocols, page 8 Configuring the IPSec Crypto Method and Parameters, page 9 Applying the Crypto Map to the Physical Interface, page 10 Creating an Easy VPN Remote Configuration , page 11 Verifying Your Easy VPN Configuration, page 13 Configuration Examples for VPN and IPSec, page 13Configuring a VPN Using Easy VPN and an IPSec TunnelCisco routers and other broadband devices provide high-performance connections to the Internet, but manyapplications also require the security of VPN connections, which perform a high level of authentication andwhich encrypt the data between two particular endpoints.Two types of VPNs are supported—site-to-site and remote access. Site-to-site VPNs are used to connectbranch offices to corporate offices, for example. Remote access VPNs are used by remote clients to log in toa corporate network.Cisco 800 Series Integrated Services Routers Software Configuration Guide1

Configuring a VPN Using Easy VPN and an IPSec TunnelConfiguring a VPN Using Easy VPN and an IPSec TunnelThe example in this chapter illustrates the configuration of a remote access VPN that uses the Cisco EasyVPN and an IP Security (IPSec) tunnel to configure and secure the connection between the remote client andthe corporate network. The figure below shows a typical deployment scenario.Figure 1: Remote Access VPN Using IPSec Tunnel1Remote, networked users2VPN client—Cisco 860 and Cisco 880 series ISRs3Router—Providing the corporate office networkaccess4VPN server—Easy VPN server5Corporate office with a network address of 10.1.1.16IPSec tunnelCisco Easy VPNThe Cisco Easy VPN client feature eliminates much of the tedious configuration work by implementing theCisco Unity Client protocol. This protocol allows most VPN parameters, such as internal IP addresses, internalsubnet masks, DHCP server addresses, WINS server addresses, and split-tunneling flags, to be defined at aVPN server that is acting as an IPSec server.An Easy VPN server-enabled device can terminate VPN tunnels initiated by mobile and remote workers whoare running Cisco Easy VPN Remote software on PCs. Easy VPN server-enabled devices allow remote routersto act as Easy VPN Remote nodes.The Cisco Easy VPN client feature can be configured in one of two modes—client mode or network extensionmode. Client mode is the default configuration and allows only devices at the client site to access resourcesCisco 800 Series Integrated Services Routers Software Configuration Guide2

Configuring a VPN Using Easy VPN and an IPSec TunnelConfiguring the IKE Policyat the central site. Resources at the client site are unavailable to the central site. Network extension modeallows users at the central site to access network resources on the client site.After the IPSec server has been configured, a VPN connection can be created with minimal configuration onan IPSec client, such as a supported Cisco 819, Cisco 860, and Cisco 880 series ISRs. When the IPSec clientinitiates the VPN tunnel connection, the IPSec server pushes the IPSec policies to the IPSec client and createsthe corresponding VPN tunnel connection.NoteThe Cisco Easy VPN client feature supports configuration of only one destination peer. If your applicationrequires creation of multiple VPN tunnels, you must manually configure the IPSec VPN and NetworkAddress Translation/Peer Address Translation (NAT/PAT) parameters on both the client and the server.Configuration TasksPerform the following tasks to configure your router for this network scenario: Configuring the IKE Policy, on page 3 Configuring Group Policy Information, on page 5 Applying Mode Configuration to the Crypto Map, on page 6 Enabling Policy Lookup, on page 7 Configuring IPSec Transforms and Protocols, on page 8 Configuring the IPSec Crypto Method and Parameters, on page 9 Applying the Crypto Map to the Physical Interface, on page 10 Creating an Easy VPN Remote Configuration , on page 11An example showing the results of these configuration tasks is provided in the Configuration Examples forVPN and IPSec, on page 13.NoteThe procedures in this chapter assume that you have already configured basic router features as well asPPPoE or PPPoA with NAT, DCHP and VLANs. If you have not performed these configurations tasks,see Basic Router Configuration, Configuring PPP over Ethernet with NAT,Configuring PPP over ATMwith NAT, and Configuring a LAN with DHCP and VLANs as appropriate for your router.NoteThe examples shown in this chapter refer only to the endpoint configuration on the Cisco 819, 860 and880 series routers. Any VPN connection requires both endpoints to be configured properly to function.See the software configuration documentation as needed to configure the VPN for other router models.Configuring the IKE PolicyTo configure the Internet Key Exchange (IKE) policy, perform these steps, beginning in global configurationmode:Cisco 800 Series Integrated Services Routers Software Configuration Guide3

Configuring a VPN Using Easy VPN and an IPSec TunnelConfiguring the IKE PolicySUMMARY STEPS1. crypto isakmp policy priority2. encryption {des 3des aes aes 192 aes 256}3. hash {md5 sha}4. authentication {rsa-sig rsa-encr pre-share}5. group {1 2 5}6. lifetime seconds7. exitDETAILED STEPSStep 1Command or ActionPurposecrypto isakmp policy priorityCreates an IKE policy that is used during IKE negotiation. Thepriority is a number from 1 to 10000, with 1 being the highest.Example:Also enters the Internet Security Association Key and ManagementProtocol (ISAKMP) policy configuration mode.Router(config)#Step 2crypto isakmp policy 1encryption {des 3des aes aes 192 aes 256} Specifies the encryption algorithm used in the IKE policy.The example specifies 168-bit data encryption standard (DES).Example:Router(config-isakmp)#Step 3encryption 3deshash {md5 sha}Specifies the hash algorithm used in the IKE policy.Example:The example specifies the Message Digest 5 (MD5) algorithm. Thedefault is Secure Hash standard (SHA-1).Router(config-isakmp)# hash md5Step 4authentication {rsa-sig rsa-encr pre-share} Specifies the authentication method used in the IKE policy.The example specifies a pre-shared key.Example:Router(config-isakmp)# authenticationpre-shareStep 5group {1 2 5}Specifies the Diffie-Hellman group to be used in an IKE policy.Example:Router(config-isakmp)#group 2Step 6lifetime secondsExample:Specifies the lifetime, in seconds, for an IKE security association(SA). Acceptable values are from 60 to 86400.Router(config-isakmp)# lifetime 480Cisco 800 Series Integrated Services Routers Software Configuration Guide4

Configuring a VPN Using Easy VPN and an IPSec TunnelConfiguring Group Policy InformationStep 7Command or ActionPurposeexitExits ISAKMP policy configuration mode and returns to globalconfiguration mode.Example:Router(config-isakmp)# exitConfiguring Group Policy InformationTo configure the group policy, perform these steps, beginning in global configuration mode:SUMMARY STEPS1. crypto isakmp client configuration group {group-name default}2. key name3. dns primary-server4. domain name5. exit6. ip local pool {default poolname} [low-ip-address [high-ip-address]]DETAILED STEPSStep 1Command or ActionPurposecrypto isakmp client configuration group{group-name default}Creates an IKE policy group containing attributes to bedownloaded to the remote client.Example:Also enters the Internet Security Association Key andManagement Protocol (ISAKMP) group policy configurationmode.Router(config)# crypto isakmp clientconfiguration group rtr-remoteRouter(config-isakmp-group)#Step 2key nameSpecifies the IKE pre-shared key for the group policy.Example:Router(config-isakmp-group)# keysecret-passwordStep 3dns primary-serverSpecifies the primary Domain Name System (DNS) server forthe group.Example:NoteRouter(config-isakmp-group)# dns 10.50.10.1To specify Windows Internet Naming Service (WINS)servers for the group, use the wins command.Cisco 800 Series Integrated Services Routers Software Configuration Guide5

Configuring a VPN Using Easy VPN and an IPSec TunnelApplying Mode Configuration to the Crypto MapStep 4Command or ActionPurposedomain nameSpecifies group domain membership.Example:Router(config-isakmp-group)# domaincompany.comStep 5Exits ISAKMP policy configuration mode and returns to globalconfiguration mode.exitExample:Router(config-isakmp-group)# exitRouter(config)#Step 6ip local pool {default poolname} [low-ip-address[high-ip-address]]Example:Specifies a local address pool for the group.For details about this command and additional parameters thatcan be set, see Cisco IOS Dial Technologies CommandReference.Router(config)# ip local pool dynpool30.30.30.20 30.30.30.30Applying Mode Configuration to the Crypto MapTo apply mode configuration to the crypto map, perform these steps, beginning in global configuration mode:SUMMARY STEPS1. crypto map map-name isakmp authorization list list-name2. crypto map tag client configuration address [initiate respond]DETAILED STEPSCommand or ActionStep 1crypto map map-name isakmp authorization list list-name Applies mode configuration to the crypto map and enableskey lookup (IKE queries) for the group policy from anauthentication, authorization, and accounting (AAA) server.Example:Router(config)# crypto map dynmap isakmpauthorization list rtr-remoteCisco 800 Series Integrated Services Routers Software Configuration Guide6Purpose

Configuring a VPN Using Easy VPN and an IPSec TunnelEnabling Policy LookupStep 2Command or ActionPurposecrypto map tag client configuration address [initiate respond]Configures the router to reply to mode configurationrequests from remote clients.Example:Router(config)# crypto map dynmap clientconfiguration address respondEnabling Policy LookupTo enable policy lookup through AAA, perform these steps, beginning in global configuration mode:SUMMARY STEPS1. aaa new-model2. aaa authentication login {default list-name} method1 [method2.]3. aaa authorization {network exec commands level reverse-access configuration} {default list-name} [method1 [method2.]]4. username name {nopassword password password password encryption-type encrypted-password}DETAILED STEPSStep 1Command or ActionPurposeaaa new-modelEnables the AAA access control model.Example:Router(config)# aaa new-modelStep 2aaa authentication login {default list-name} method1 Specifies AAA authentication of selected users at login, andspecifies the method used.[method2.] This example uses a local authentication database.Example:You could also use a RADIUS server for this. Fordetails, see Cisco IOS Security Configuration Guide andCisco IOS Security Command Reference.aaa authorization {network exec commands level Specifies AAA authorization of all network-related service reverse-access configuration} {default list-name} requests, including PPP, and specifies the method ofauthorization.[method1 [method2.]]Router(config)# aaa authentication loginrtr-remote localStep 3Note This example uses a local authorization database.Example:Router(config)# aaa authorization networkrtr-remote localCisco 800 Series Integrated Services Routers Software Configuration Guide7

Configuring a VPN Using Easy VPN and an IPSec TunnelConfiguring IPSec Transforms and ProtocolsCommand or ActionPurposeYou could also use a RADIUS server for this. Fordetails, see the Cisco IOS Security Configuration Guideand Cisco IOS Security Command Reference.username name {nopassword password password Establishes a username-based authentication system. password encryption-type encrypted-password}NoteStep 4Example:Router(config)# username Cisco password 0 CiscoConfiguring IPSec Transforms and ProtocolsA transform set represents a certain combination of security protocols and algorithms. During IKE negotiation,the peers agree to use a particular transform set for protecting data flow.During IKE negotiations, the peers search in multiple transform sets for a transform that is the same at bothpeers. When such a transform set is found, it is selected and applied to the protected traffic as a part of bothpeer configurations.To specify the IPSec transform set and protocols, perform these steps, beginning in global configuration mode:SUMMARY STEPS1. crypto ipsec transform-set transform-set-name transform1 [transform2] [transform3] [transform4]2. crypto ipsec security-association lifetime {seconds seconds kilobytes kilobytes}DETAILED STEPSCommand or ActionStep 1Purposecrypto ipsec transform-set transform-set-name transform1 Defines a transform set—an acceptable combination of[transform2] [transform3] [transform4]IPSec security protocols and algorithms.Example:See Cisco IOS Security Command Reference for detailsabout the valid transforms and combinations.Router(config)# crypto ipsec transform-set vpn1esp-3des esp-sha-hmacExample:Step 2crypto ipsec security-association lifetime {seconds seconds Specifies global lifetime values used when IPSec securityassociations are negotiated. kilobytes kilobytes}Example:Router(config)# crypto ipsec security-associationlifetime seconds 86400Cisco 800 Series Integrated Services Routers Software Configuration Guide8

Configuring a VPN Using Easy VPN and an IPSec TunnelConfiguring the IPSec Crypto Method and ParametersWhat to Do NextNoteWith manually established security associations, there is no negotiation with the peer, and both sides mustspecify the same transform set.Configuring the IPSec Crypto Method and ParametersA dynamic crypto map policy processes negotiation requests for new security associations from remote IPSecpeers, even if the router does not know all the crypto map parameters (for example, IP address).To configure the IPSec crypto method, perform these steps, beginning in global configuration mode:SUMMARY STEPS1. crypto dynamic-map dynamic-map-name dynamic-seq-num2. set transform-set transform-set-name [transform-set-name2.transform-set-name6]3. reverse-route4. exit5. crypto map map-name seq-num [ipsec-isakmp] [dynamic dynamic-map-name] [discover] [profileprofile-name]DETAILED STEPSCommand or ActionStep 1Purposecrypto dynamic-map dynamic-map-name dynamic-seq-num Creates a dynamic crypto map entry and enters cryptomap configuration mode.Example:Router(config)# crypto dynamic-map dynmap 1See Cisco IOS Security Command Reference fordetails about this command.Router(config-crypto-map)#Step 2set transform-set et-name6]Specifies which transform sets can be used with thecrypto map entry.Example:Router(config-crypto-map)# set transform-set vpn1Step 3Creates source proxy information for the crypto -map)# reverse-routeCisco 800 Series Integrated Services Routers Software Configuration Guide9

Configuring a VPN Using Easy VPN and an IPSec TunnelApplying the Crypto Map to the Physical InterfaceStep 4Command or ActionPurposeexitExits crypto map configuration mode and returns toglobal configuration mode.Example:Router(config-crypto-map)# exitRouter(config)#Step 5crypto map map-name seq-num [ipsec-isakmp] [dynamicdynamic-map-name] [discover] [profile profile-name]Creates a crypto map profile.Example:Router(config)# crypto map static-map 1 ipsec-isakmpdynamic dynmapApplying the Crypto Map to the Physical InterfaceThe crypto maps must be applied to each interface through which IP Security (IPSec) traffic flows. Applyingthe crypto map to the physical interface instructs the router to evaluate all the traffic against the securityassociations database. With the default configurations, the router provides secure connectivity by encryptingthe traffic sent between remote sites. However, the public interface still allows the rest of the traffic to passand provides connectivity to the Internet.To apply a crypto map to an interface, perform these steps, beginning in global configuration mode:SUMMARY STEPS1. interface type number2. crypto map map-name3. exitDETAILED STEPSStep 1Command or ActionPurposeinterface type numberEnters the interface configuration mode for the interface towhich the crypto map applies.Example:Router(config)# interface fastethernet 4Router(config-if)#Step 2crypto map map-nameApplies the crypto map to the interface.Cisco 800 Series Integrated Services Routers Software Configuration Guide10

Configuring a VPN Using Easy VPN and an IPSec TunnelCreating an Easy VPN Remote ConfigurationCommand or ActionPurposeExample:See Cisco IOS Security Command Reference for details aboutthis command.Router(config-if)# crypto map static-mapStep 3Exits interface configuration mode and returns to globalconfiguration mode.exitExample:Router(config-crypto-map)# exitRouter(config)#Creating an Easy VPN Remote ConfigurationThe router acting as the IPSec remote router must create an Easy VPN remote configuration and assign it tothe outgoing interface.To create the remote configuration, perform these steps, beginning in global configuration mode:SUMMARY STEPS1. crypto ipsec client ezvpn name2. group group-name key group-key3. peer {ipaddress hostname}4. mode {client network-extension network extension plus}5. exit6. interface type number7. crypto ipsec client ezvpn name [outside inside]8. exitDETAILED STEPSStep 1Command or ActionPurposecrypto ipsec client ezvpn nameCreates a Cisco Easy VPN remote configuration, and entersCisco Easy VPN remote configuration mode.Example:Router(config)# crypto ipsec client ezvpnezvpnclientRouter(config-crypto-ezvpn)#Cisco 800 Series Integrated Services Routers Software Configuration Guide11

Configuring a VPN Using Easy VPN and an IPSec TunnelCreating an Easy VPN Remote ConfigurationStep 2Command or ActionPurposegroup group-name key group-keySpecifies the IPSec group and IPSec key value for the VPNconnection.Example:Router(config-crypto-ezvpn)# group ezvpnclientkey secret-passwordRouter(config-crypto-ezvpn)#Step 3peer {ipaddress hostname}Specifies the peer IP address or hostname for the pn)# peer 192.168.100.1A hostname can be specified only when the routerhas a DNS server available for hostname resolution.Router(config-crypto-ezvpn)#Step 4mode {client network-extension network extension Specifies the VPN mode of # mode clientRouter(config-crypto-ezvpn)#Step 5exitExits Cisco Easy VPN remote configuration mode and returnsto global configuration mode.Example:Router(config-crypto-ezvpn)# exitRouter(config)#Step 6interface type numberEnters the interface configuration mode for the interface towhich the Cisco Easy VPN remote configuration applies.Example:NoteRouter(config)# interface fastethernet 4For routers with an ATM WAN interface, thiscommand would be interface atm 0.Router(config-if)#Step 7crypto ipsec client ezvpn name [outside inside]Assigns the Cisco Easy VPN remote configuration to the WANinterface.Example:This command causes the router to automatically create theNAT or port address translation (PAT) and access listconfiguration needed for the VPN connection.Router(config-if)# crypto ipsec client ezvpnezvpnclient outsideRouter(config-if)#Step 8exitExits interface configuration mode and returns to globalconfiguration mode.Example:Router(config-crypto-ezvpn)# exitRouter(config)#Cisco 800 Series Integrated Services Routers Software Configuration Guide12

Configuring a VPN Using Easy VPN and an IPSec TunnelVerifying Your Easy VPN ConfigurationVerifying Your Easy VPN ConfigurationRouter# show crypto ipsec client ezvpnTunnel name :ezvpnclientInside interface list:vlan 1Outside interface:fastethernet 4Current State:IPSEC ACTIVELast Event:SOCKET UPAddress:8.0.0.5Mask:255.255.255.255Default Domain:cisco.comConfiguration Examples for VPN and IPSecThe following configuration example shows a portion of the configuration file for the VPN and IPSec tunneldescribed in this chapter.!aaa new-model!aaa authentication login rtr-remote localaaa authorization network rtr-remote localaaa session-id common!username Cisco password 0 Cisco!crypto isakmp policy 1encryption 3desauthentication pre-sharegroup 2lifetime 480!crypto isakmp client configuration group rtr-remotekey secret-passworddns 10.50.10.1 10.60.10.1domain company.compool dynpool!crypto ipsec transform-set vpn1 esp-3des esp-sha-hmac!crypto ipsec security-association lifetime seconds 86400!crypto dynamic-map dynmap 1set transform-set vpn1reverse-route!crypto map static-map 1 ipsec-isakmp dynamic dynmapcrypto map dynmap isakmp authorization list rtr-remotecrypto map dynmap client configuration address respondcrypto ipsec client ezvpn ezvpnclientconnect autogroup 2 key secret-passwordmode clientpeer 192.168.100.1!interface fastethernet 4crypto ipsec client ezvpn ezvpnclient outsidecrypto map static-map!interface vlan 1Cisco 800 Series Integrated Services Routers Software Configuration Guide13

Configuring a VPN Using Easy VPN and an IPSec TunnelConfiguration Examples for VPN and IPSeccrypto ipsec client ezvpn ezvpnclient inside!Cisco 800 Series Integrated Services Routers Software Configuration Guide14

Router(config-crypto-ezvpn)# Step 1 Cisco 800 Series Integrated Services Routers Software Configuration Guide 11 Configuring a VPN Using Easy VPN and an IPSec Tunnel Creating an Easy