ISCW10S04 IPsec
ISCW10S04 IPsec
ISCW10S04 IPsec
IPsec Overview
What Is IPsec?
IPsec is an IETF standard that employs cryptographic mechanisms on the network layer: Authentication of every IP packet Verification of data integrity for each packet Confidentiality of packet payload Consists of open standards for securing private communications
IPsec Protocols
IPsec uses three main protocols to create a security framework:
Internet Key Exchange (IKE):
IPsec Headers
Peer Authentication
IKE Phases
Phase 1: Authenticate the peers Negotiate a bidirectional SA
IKE Modes
Mode Configuration
Easy VPN
Dynamically updated: Central services and security policy Offload VPN function from local devices Client and network extension mode
Centralized control: Configuration and security policy pushed at the time of the VPN tunnel establishment
Xauth
ESP and AH
ESP and AH
IPsec protocols:
ESP or AH
ESP uses IP protocol number 50 AH uses IP protocol number 51 IPsec modes:
ESP allows encryption and authenticates the original packet. AH authenticates the whole packet (including the header) and does not allow encryption.
ESP Protocol
Algorithms DES, MD5 RC4, SHA-1 3DES AES-128, SHA-256 AES-192, SHA-384 AES-256, SHA-512
168-bit total key length Mode of operation decides how to process DES three times Normally: encrypt, decrypt, encrypt 3DES requires more processing than DES
PKI Environment
PKI Environment
Certificate Authority
The trust basis of a PKI system Verifies user identity, issues certificates by binding identity of a user to a public key with a digital certificate Revokes certificates and publishes CRL In-house implementation or outsourcing
X.509 v3 Certificate
PKI Credentials
How to store PKI credentials:
RSA keys and certificates NVRAM
eToken:
Cisco 871, 1800, 2800, 3800 Series router Cisco IOS Release 12.3(14)T image Cisco USB eToken A k9 image
Summary
IPsec provides a mechanism for secure data transmission over IP networks. The IKE protocol is a key management protocol standard used in conjunction with the IPsec standard. IKE has some additional functions: DPD, NAT traversal, encapsulation in UDP packet, config mode, and Xauth. The two IP protocols used in the IPsec standard are ESP and AH. For message authentication and integrity check, an HMAC is used. The two types of encryption are symmetric encryption and asymmetric encryption. PKI provides customers with a scalable, secure mechanism for distributing, managing, and revoking encryption and identity information in a secured data network.
IPsec VPNs
IKE Policy
Negotiates IPsec security parameters, IPsec transform sets Establishes IPsec SAs Periodically renegotiates IPsec SAs to ensure security Optionally, performs an additional Diffie-Hellman exchange
A transform set is a combination of algorithms and protocols that enact a security policy for traffic.
Security Associations
SA database: Destination IP address SPI Protocol (ESP or AH) Security policy database:
Encryption algorithm
Authentication algorithm Mode
Key lifetime
SA Lifetime
Data transmitted-based
Time-based
By an SA lifetime timeout
If the packet counter is exceeded IPsec SA is removed
Configuring IPsec
Router1#show access-lists access-list 102 permit ahp host 172.16.172.10 host 172.16.171.20 access-list 102 permit esp host 172.16.172.10 host 172.16.171.20 access-list 102 permit udp host 172.16.172.10 host 172.16.171.20 eq isakmp
Ensure that protocols 50 and 51 and UDP port 500 traffic is not blocked on interfaces used by IPsec.
Summary
IPsec operation includes these steps: Initiation by interesting traffic of the IPsec process, IKE Phase 1, IKE Phase 2, data transfer, and IPsec tunnel termination. To configure a site-to-site IPsec VPN: Configure the ISAKMP policy, define the IPsec transform set, create a crypto ACL, create a crypto map, apply crypto map, and configure ACL. To define an IKE policy, use the crypto isakmp policy global configuration command. To define an acceptable combination of security protocols and algorithms used for IPsec, use the crypto ipsec transformset global configuration command. To apply a previously defined crypto map set to an interface, use the crypto map interface configuration command. Configure an ACL to enable the IPsec protocols (protocol 50 for ESP or 51 for AH) and IKE protocol (UDP/500).
IPsec VPNs
2.
1.
2a.
2b.
3.
Quick Setup
Step-by-Step Setup
Multiple steps are used to configure the VPN connection:
Defining connection settings: Outside interface, peer address, authentication credentials Defining IKE proposals: Priority, encryption algorithm, HMAC, authentication type, Diffie-Hellman group, lifetime Defining IPsec transform sets: Encryption algorithm, HMAC, mode of operation, compression Defining traffic to protect: Single source and destination subnets, ACL Reviewing and completing the configuration
Connection Settings
Connection Settings
1.
2.
3.
4.
IKE Proposals
IKE Proposals
1.
2.
3.
Transform Set
Transform Set
1.
2. 3.
1.
2.
3.
1. 3.
2.
1.
2.
1. 2.
3.
~ ~
~ ~
1.
3.
2.
Advanced Monitoring
router#
Advanced monitoring can be performed using the default Cisco IOS HTTP server interface. Requires knowledge of Cisco IOS CLI commands.
Troubleshooting
router#
Debugs IKE communication Advanced troubleshooting can be performed using the Cisco IOS CLI Requires knowledge of Cisco IOS CLI commands
Summary
SDM is a GUI and one of its features is to provide simplified management of security mechanisms on Cisco IOS routers. SDM can manage various types of site-to-site VPNs. SDM can be used to implement a simple site-to-site VPN in three ways: Using the quick setup wizard Using the step-by-step wizard
IPsec VPNs
GRE can optionally contain any one or more of these fields: Tunnel checksum Tunnel key Tunnel packet sequence number
GRE tunnel is up and protocol up if: Tunnel source and destination are configured Tunnel destination is in routing table GRE keepalives are received (if used) GRE is the default tunnel mode.
IPsec Characteristics
IPsec provides what GRE lacks: Confidentiality through encryption using symmetric algorithms (e.g., 3DES or AES) Data source authentication using HMACs (e.g., MD5 or SHA-1) Data integrity verification using HMACs IPsec is not perfect at tunneling: Older Cisco IOS software versions do not support IP multicast over IPsec IPsec was designed to tunnel IP only (no multiprotocol support) Using crypto maps to implement IPsec does not allow the usage of routing protocols across the tunnel IPsec does not tunnel IP protocols; GRE does
2.
5. 6.
1.
2.
3. 4.
1. 2.
3.
4.
1A 2.
1B
IKE Proposals
IKE Proposals
Transform Set
Transform Set
1.
2. 3.
Routing Information
Routing Information
1.
2.
1.
2.
3.
6.
7.
3.
2.
Advanced Monitoring
router#
show interfaces Lists interface and the statistics including the statistics of tunnel interfaces
Advanced monitoring can be performed using the default Cisco IOS HTTP server interface. Requires knowledge of Cisco IOS CLI commands.
Troubleshooting
router#
Debugs IKE communication Advanced troubleshooting can be performed using the Cisco IOS CLI Requires knowledge of Cisco IOS CLI commands
Summary
GRE is a multiprotocol tunneling technology. SDM can be used to implement GRE over IPsec site-to-site VPNs. Backup tunnels can be configured in addition to one primary tunnel. Routing can be configured through the tunnel interfaces: Static for simple sites
OSPF or EIGRP for more complex sites (more networks, multiple tunnels)
Upon completing the configuration, the SDM converts the configuration into the Cisco IOS CLI format.
IPsec VPNs
Failures
IPsec VPNs can experience any one of a number of different types of failures: Access link failure Remote peer failure Device failure
Path failure
IPsec should be designed and implemented with redundancy and high-availability mechanisms to mitigate these failures.
Redundancy
Failure Detection
Native IPsec uses DPD to detect failures in the path and remote peer failure.
Any form of GRE over IPsec typically uses a routing protocol to detect failures (hello mechanism). HSRP is typically used to detect failures of local devices. VRRP and GLBP have similar failure-detection functionality.
Configuration Example
Router will first try primary peer. If primary peer is not available or becomes unavailable (DPD failure detection), the router tries backup peers in order as listed in the crypto map.
HSRP can be used at: Headend: Two head-end IPsec devices appear as one to remote peers Remote site: Two IPsec gateways appear as one to local devices Active HSRP device uses a virtual IP and MAC address. Standby HSRP device takes over virtual IP and MAC address when active HSRP device goes down.
All remote devices use virtual IP as default gateway. Backup router is only used when primary router is down.
Remote sites peer with virtual IP address (HSRP) of the headend. RRI or HSRP can be used on inside interface to ensure proper return path.
Configure IPC to exchange state information between head-end devices. Enable stateful redundancy.
IPsec VPNs can be used as cost-effective and fast backups for an existing WAN.
Switchover options: Using an IGP (e.g., GRE over IPsec or VTI): Use IGP metrics to influence primary path selection Optionally, use HSRP to track PVC status on remote site Using floating static routes for VPN destinations
Backing Up a WAN Connection with an IPsec VPN: Example Using GRE over IPsec
IGP used to detect PVC failures Reroute to GRE over IPsec tunnel
Summary
High availability requires two components: Redundant device, links, or paths High availability mechanisms to detect failures and reroute Native IPsec can be configured with backup peers in crypto maps in combination with DPD. HSRP can be used instead of backup peers.
IPsec stateful failover can augment HSRP to minimize downtime upon head-end device failures.
IPsec VPNs can be used as a backup for other types of networks.
IPsec VPNs
Configuring Cisco Easy VPN and Easy VPN Server Using SDM
Using pre-shared keys? Initiate aggressive mode. Using digital certificates? Initiate main mode.
The VPN client attempts to establish an SA between peer IP addresses by sending multiple ISAKMP proposals to the Easy VPN Server. To reduce manual configuration on the VPN client, these ISAKMP proposals include several combinations of the following: Encryption and hash algorithms Authentication methods Diffie-Hellman group sizes
The Easy VPN Server searches for a match: The first proposal to match the server list is accepted (highestpriority match). The most secure proposals are always listed at the top of the Easy VPN Server proposal list (highest priority). The ISAKMP SA is successfully established.
Step 4: The Cisco Easy VPN Server Initiates a Username and Password Challenge
If the Easy VPN Server is configured for Xauth, the VPN client waits for a username/password challenge: The user enters a username/password combination. The username/password information is checked against authentication entities using AAA. All Easy VPN Servers should be configured to enforce user authentication.
If the Easy VPN Server indicates successful authentication, the VPN client requests the remaining configuration parameters from the Easy VPN Server: Mode configuration starts. The remaining system parameters (IP address, DNS, split tunneling information, and so on) are downloaded to the VPN client. Remember that the IP address is the only required parameter in a group profile; all other parameters are optional.
RRI should be used when the following conditions occur: More than one VPN server is used Per-client static IP addresses are used with some clients (instead of using per-VPN-server IP pools) RRI ensures the creation of static routes. Redistributing static routes into an IGP allows the servers site routers to find the appropriate Easy VPN Server for return traffic to clients.
After the configuration parameters have been successfully received by the VPN client, IPsec quick mode is initiated to negotiate IPsec SA establishment. After IPsec SA establishment, the VPN connection is complete.
Cisco Easy VPN Server Configuration Tasks for the Easy VPN Server Wizard
The Easy VPN server wizard includes these tasks:
Selecting the interface on which to terminate IPsec IKE policies
RADIUS/TACACS+ server
CA and enrollment with the CA DNS resolution for the VPN server addresses
VPN Wizards
1.
3.
2.
Enabling AAA
2.
1.
3. 2.
1.
Creating Users
1.
2.
7. 3. 4. 8.
5.
6.
Enabling AAA
1.
2.
1.
2.
IKE Proposals
IKE Proposals
2.
1.
3.
Transform Set
Transform Set
3. 1.
2. 4.
1.
2.
1.
2.
1. 2.
3.
4.
User Authentication
1. 2.
3.
1.
6.
2.
3.
4. 5.
1.
2.
3.
General Parameters
1.
2.
3A.
3B.
1.
2.
Split Tunneling
1. 2. 3.
4.
5.
Advanced Options
1. 3.
4.
2.
Xauth Options
3. 1.
2.
4.
1. 2.
3.
3.
4.
2.
5.
Advanced Monitoring
router#
Advanced monitoring can be performed using the default Cisco IOS HTTP server interface. Requires knowledge of Cisco IOS CLI commands.
Troubleshooting
router#
debug radius
Advanced troubleshooting can be performed using the Cisco IOS CLI. Requires knowledge of Cisco IOS CLI commands.
Summary
Cisco Easy VPN consists of two components: Easy VPN Server and Easy VPN Remote. Cisco Easy VPN Server can be configured using SDM. If you are using a local IP address pool, you need to configure that pool for use with Easy VPN. AAA is enabled for policy lookup. ISAKMP policies are configured for VPN clients.
Summary (Cont.)
The steps for defining group policy include configuring the following: Policy profile of the group that will be defined Preshared key DNS servers WINS servers DNS domain
IPsec VPNs
Use the Cisco VPN Client to Establish an RA VPN Connection and Verify the Connection Status
Use the Cisco VPN Client to Establish a VPN Connection and Verify the Connection Status
Installation process:
Download the latest version of the Cisco VPN Client from the CCO. Remove any previous versions of the Cisco VPN Client. Start the setup process that will guide you through the installation steps. Configuration process: Start the VPN Client. Create and configure VPN connections. Test VPN connections.
2.
3.
4. 5.
6.
1.
2. 3.
4.
Authentication options:
Group preshared secrets (group name and group secret) Mutual authentication (import CA certificate first; group name and secret) Digital certificates (enroll with the CA first; select the certificate)
1.
2.
Mutual authentication should be used instead of group preshared secrets. Group preshared secrets are vulnerable to man-in-the-middle attacks if the attacker knows the group preshared secret.
1. 2.
On by default. NAT-T enables IPsec and IKE over a standard UDP port 4500, allowing the VPN Client to be behind a NAT or PAT device.
Routing Table
2. 1.
The Statistics window provides information about tunnel details, routing table, and personal firewall.
1. 2.
3.
List backup VPN servers to be used in case the primary VPN server is not reachable.
Optionally, tie a VPN connection to a dial-up connection defined in the Networking section of Windows.
Summary
You can install the VPN Client on your system through either of two different applications: InstallShield and MSI. Connection entries include: The VPN device (the remote server) to access Preshared keys Certificates Optional parameters
Summary (Cont.)
Transparent tunneling allows secure transmission through a router serving as a firewall, which may also be performing NAT or PAT. Access to local LAN resources can be made available. The private network may include one or more backup VPN servers to use if the primary server is not available. You can connect to the Internet using the VPN Client application in either of the following ways: Microsoft Dial-Up Networking A third-party dial-up program, usually from your ISP
Module Summary
The IKE protocol is a key management protocol standard used in conjunction with the IPsec standard. IPsec is used to create secure remote access VPNs. GRE is used to support non-IP protocols. GRE can be run inside IPsec for added security. SDM is an easy-to-use Internet browser-based device management tool that is embedded within the Cisco IOS 800 3800 Series access routers at no cost. SDM has a unique Security Audit wizard that provides a comprehensive router security audit.