You are on page 1of 82

Chapter 4:

Implementing Virtual Private


Networks

CCNA Security v2.0


4.0 Introduction
4.1 VPNs
4.2 IPsec VPN Components and
Chapter Outline Operations
4.3 Implementing Site-to-Site
IPsec VPNs with CLI
4.4 Summary

© 2013 Cisco and/or its affiliates. All rights reserved. Cisco Public 2
Section 4.1:
VPNs
Upon completion of this section, you should be able to:
• Describe VPNs and their benefits.

• Compare site-to-site and remote-access VPNs.

© 2013 Cisco and/or its affiliates. All rights reserved. Cisco Public 3
Topic 4.1.1:
VPN Overview

© 2013 Cisco and/or its affiliates. All rights reserved. Cisco Public 4
Introducing VPNs

• A virtual private network (VPN) is a technology that creates a


safe and encrypted connection over a less secure
network, such as the Internet.
• VPN technology was developed as a way to allow remote users
and branch offices to securely access corporate applications
and other resources.
• To ensure safety, data travels through secure tunnels and VPN
users must use authentication methods -- including
passwords, tokens and other unique identification methods --
to gain access to the VPN.

© 2013 Cisco and/or its affiliates. All rights reserved. Cisco Public 5
Introducing VPNs

• The benefit of using a secure VPN is it ensures the appropriate level


of security to the connected systems when that cannot provided by
the underlying network infrastructure alone.
• Typical uses of VPN:

• a) The mobile employee who uses hotel Internet facilities to


establish a VPN tunnel and connects to servers at the office.
• b) To establish a secure link from a regional office (branches) to a
corporate HQ.

© 2013 Cisco and/or its affiliates. All rights reserved. Cisco Public 6
Introducing VPNs
VPN Benefits:
• Cost Savings

• Security

• Scalability

• Compatibility

© 2013 Cisco and/or its affiliates. All rights reserved. Cisco Public 7
Layer 3 IPsec VPNs

© 2013 Cisco and/or its affiliates. All rights reserved. Cisco Public 8
Topic 4.1.2:
VPN Technologies

© 2013 Cisco and/or its affiliates. All rights reserved. Cisco Public 9
Two Types of VPNs

Remote-Access VPN

Site-to-Site VPN
Access

© 2013 Cisco and/or its affiliates. All rights reserved. Cisco Public 10
Components of Remote-Access VPNs

© 2013 Cisco and/or its affiliates. All rights reserved. Cisco Public 11
Remote-Access VPNs

• A remote access VPN used when employees of a company who are


in remote locations need to connect to the company's private
network.
• It connects a distance client to a central LAN location using the
Internet.
• Remote access VPN clients connect to a VPN gateway server on the
organization's network. The gateway requires the device to
authenticate its identity before granting access to internal network
resources such as file servers, printers and intranets
• Allow remote users like telecommuters to securely access the
corporate network wherever and whenever they need to.
• A remote access VPN makes the most sense for a mobile employee
within the company. 

© 2013 Cisco and/or its affiliates. All rights reserved. Cisco Public 12
Remote-Access VPNs

© 2013 Cisco and/or its affiliates. All rights reserved. Cisco Public 13
Components of Site-to-Site VPNs

© 2013 Cisco and/or its affiliates. All rights reserved. Cisco Public 14
Site-to-Site VPNs
• Also known as Intranet VPN, it connects two routers (VPN
terminating devices) to secure traffic between two sites that are
physically separated.
• Site-to-site VPN uses a gateway device to connect an entire network
in one location (HQ) to a network in another location (branches).
• When networks are connected over the Internet, as shown in the
following figure, a router forwards packets to another router across a
VPN connection.
• It connected departments, branch offices of the company.

• An intranet VPN is best for remote offices within the same company.

• A site-to-site VPN requires large-scale encryption and dedicated


equipment.

© 2013 Cisco and/or its affiliates. All rights reserved. Cisco Public 15
Site-to-Site VPNs
• An intranet (password-protected site for company employees)-
based VPN connects LAN to LAN when a company wants to
connect multiple remote connections in one private network.

© 2013 Cisco and/or its affiliates. All rights reserved. Cisco Public 16
Section 4.2:
IPsec VPN Components and
Operation
Upon completion of this section, you should be able to:
• Describe the IPsec protocol and its basic functions.

• Compare AH and ESP protocols.

• Describe the IKE protocol.

© 2013 Cisco and/or its affiliates. All rights reserved. Cisco Public 17
Topic 4.2.1:
Introducing IPsec

© 2013 Cisco and/or its affiliates. All rights reserved. Cisco Public 18
IPsec Protocol
• The IPSec (Internet Protocol Security) Protocol Suite is a set of
network security protocols, developed to ensure the
Confidentiality, Integrity, and Authentication of Data traffic over
TCP/IP network.
• IPSec Protocol Suite provides security to the network traffic by
ensuring Data Confidentiality, Data Integrity, Sender and
Recipient Authentication and Replay Protection.

© 2013 Cisco and/or its affiliates. All rights reserved. Cisco Public 19
IPsec Technologies

IPsec Implementation
IPsec Framework Examples

© 2013 Cisco and/or its affiliates. All rights reserved. Cisco Public 20
Confidentiality
Confidentiality with Encryption:

Encrypted message

© 2013 Cisco and/or its affiliates. All rights reserved. Cisco Public 21
Confidentiality (Cont.)
Encryption Algorithms:

© 2013 Cisco and/or its affiliates. All rights reserved. Cisco Public 22
Confidentiality
Confidentiality:
• The Data in network traffic must be available only to the
intended recipient.
• In other words, the Data in network traffic MUST NOT be
available to anyone else other than the intended recipient.
• IPSec provides Data Confidentiality to Data by Encrypting it
during its journey – from sender to receiver/recipient.

© 2013 Cisco and/or its affiliates. All rights reserved. Cisco Public 23
Integrity
Hash Algorithms

Security of Hash Algorithms

© 2013 Cisco and/or its affiliates. All rights reserved. Cisco Public 24
Integrity
Integrity:
• The Data in network traffic MUST NOT be altered while in
network – during transmission.
• In other words, the Data which is received by the recipient must be
exactly same as the Data sent from the Sender.
• IPSec (Internet Protocol Security) provides Data Integrity by using
Hashing Algorithms.

© 2013 Cisco and/or its affiliates. All rights reserved. Cisco Public 25
Authentication

Peer Authentication Methods

PSK

© 2013 Cisco and/or its affiliates. All rights reserved. Cisco Public 26
Authentication (Cont.)
RSA

© 2013 Cisco and/or its affiliates. All rights reserved. Cisco Public 27
Authentication
Authentication:
• Sender and the Recipient MUST PROVE their identity with each
other.
• IPSec provides Authentication services by using Digital Certificates
or Pre-Shared keys.

© 2013 Cisco and/or its affiliates. All rights reserved. Cisco Public 28
Secure Key Exchange
Diffie-Hellman Key Exchange

© 2013 Cisco and/or its affiliates. All rights reserved. Cisco Public 29
Topic 4.2.2:
IPsec Protocols

© 2013 Cisco and/or its affiliates. All rights reserved. Cisco Public 30
IPsec Protocol Overview

© 2013 Cisco and/or its affiliates. All rights reserved. Cisco Public 31
IPsec Protocol
• Following are the three main components of IPSec.

• 1) Internet Key Exchange (IKE) Protocol:

• Internet Key Exchange (IKE) is an IETF protocol and it has two


versions, an old version IKEv1 and a relatively new version, IKEv2.
• Internet Key Exchange (IKE) is used to establish Security
Association (SA) between two communicating IPSec devices.
• It designed to allow two devices to dynamically exchange
Encryption Keys and negotiate Security Associations (SA).
• Internet Key Exchange (IKE) Security Associations (SA) can be
established dynamically and removed at a negotiated time period.

© 2013 Cisco and/or its affiliates. All rights reserved. Cisco Public 32
IPsec Protocol
• Following are the three main components of IPSec.

• 2) Encapsulating Security Payload (ESP):

• IPSec uses ESP (Encapsulating Security Payload) to provide Data


Integrity, Encryption, Authentication, and Anti-Replay functions
for IPSec VPN.
• Cisco IPSec implementations uses DES, 3DES and AES for Data
Encryption.
• ESP authenticates the data within the VPN, ensuring Data
Integrity and that it coming from the correct source.

© 2013 Cisco and/or its affiliates. All rights reserved. Cisco Public 33
IPsec Protocol
• Following are the three main components of IPSec.

• 3) Authentication Header (AH): IPSec uses Authentication


Header (AH) to provide Data Integrity, Authentication, and Anti-
Replay functions for IPSec VPN.
• Authentication Header (AH) does not provide any Data Encryption.

• Authentication Header (AH) can be used to provide Data Integrity


services to ensure that Data is not tampered (not altered)
during its journey.

• Note: ESP is more widely deployed than AH, because ESP provides
all the benefits of IPSec, that is, Confidentiality, Integrity,
Authentication and Re-Play attack protection.

© 2013 Cisco and/or its affiliates. All rights reserved. Cisco Public 34
Authentication Header
AH Protocols

© 2013 Cisco and/or its affiliates. All rights reserved. Cisco Public 35
Authentication Header (Cont.)
Router Creates Hash and Transmits
to Peer

Peer Router Compares Recomputed


Hash to Received Hash

© 2013 Cisco and/or its affiliates. All rights reserved. Cisco Public 36
Encapsulating Security Payload (ESP)

© 2013 Cisco and/or its affiliates. All rights reserved. Cisco Public 37
ESP Encrypts and Authenticates

© 2013 Cisco and/or its affiliates. All rights reserved. Cisco Public 38
Transport and Tunnel Modes

Apply ESP and AH in Two Modes

© 2013 Cisco and/or its affiliates. All rights reserved. Cisco Public 39
Transport and Tunnel Modes (Cont.)
ESP Tunnel Mode

© 2013 Cisco and/or its affiliates. All rights reserved. Cisco Public 40
Topic 4.2.3:
Internet Key Exchange

© 2013 Cisco and/or its affiliates. All rights reserved. Cisco Public 41
The IKE Protocol

© 2013 Cisco and/or its affiliates. All rights reserved. Cisco Public 42
Phase 1 and 2 Key Negotiation

© 2013 Cisco and/or its affiliates. All rights reserved. Cisco Public 43
Phase 2: Negotiating SAs

© 2013 Cisco and/or its affiliates. All rights reserved. Cisco Public 44
Section 4.3:
Implementing Site-to-Site IPsec
VPNs with CLI
Upon completion of this section, you should be able to:
• Describe IPsec negotiation and the five steps of IPsec configuration.

• Configure the ISAKMP policy.

• Configure the IPsec policy.

• Configure and apply a crypto map.

• Verify the IPsec VPN.

© 2013 Cisco and/or its affiliates. All rights reserved. Cisco Public 45
Topic 4.3.1:
Configuring a Site-to-Site IPsec VPN

© 2013 Cisco and/or its affiliates. All rights reserved. Cisco Public 46
IPsec Negotiation

IPsec VPN Negotiation:


Step 1 - Host A sends
interesting traffic to Host B.

IPsec VPN Negotiation:


Step 2 - R1 and R2
negotiate an IKE Phase 1
session.

IPsec VPN Negotiation:


Step 3 - R1 and R2
negotiate an IKE Phase
2 session.

© 2013 Cisco and/or its affiliates. All rights reserved. Cisco Public 47
IPsec Negotiation (Cont.)

IPsec VPN Negotiation:


Step 4 - Information is
exchanged via IPsec tunnel.

IPsec VPN Negotiation:


Step 5 - The IPsec
tunnel is terminated.

© 2013 Cisco and/or its affiliates. All rights reserved. Cisco Public 48
How IPsec Works
• IPSec's operation can be broken down into five main steps:

1. "Interesting traffic" initiates the IPSec process. Traffic is deemed


interesting when the IPSec security policy configured in the
IPSec peers starts the IKE process.

2. IKE phase 1. IKE authenticates IPSec peers and negotiates IKE


SAs during this phase, setting up a secure channel for
negotiating IPSec SAs in phase 2.

© 2013 Cisco and/or its affiliates. All rights reserved. Cisco Public 49
How IPsec Works
• IPSec's operation can be broken down into five main steps:

3. IKE phase 2. IKE negotiates IPSec SA parameters and sets up


matching IPSec SAs in the peers.

4. Data transfer. Data is transferred between IPSec peers based on


the IPSec parameters and keys stored in the SA database.

5. IPSec tunnel termination. IPSec SAs terminate through deletion


or by timing out.

© 2013 Cisco and/or its affiliates. All rights reserved. Cisco Public 50
How IPsec Works

© 2013 Cisco and/or its affiliates. All rights reserved. Cisco Public 51
IPsec Negotiation
• To build the VPN tunnel, IPSec peers exchange a series of
messages about encryption and authentication, and attempt to
agree on many different parameters.
• This process is known as VPN negotiations.

• One device in the negotiation sequence is the initiator and the


other device is the responder.
• VPN negotiations happen in two distinct phases: Phase 1 and
Phase 2.
• The Phase 1 and Phase 2 configurations must match for the devices
on either end of the tunnel.

© 2013 Cisco and/or its affiliates. All rights reserved. Cisco Public 52
IPsec Negotiation
Phase 1
• The main purpose of Phase 1 is to set up a secure encrypted
channel through which the two peers can negotiate Phase 2. When
Phase 1 finishes successfully, the peers quickly move on to Phase 2
negotiations. If Phase 1 fails, the devices cannot begin Phase 2.
Phase 2
• The purpose of Phase 2 negotiations is for the two peers to agree
on a set of parameters that define what traffic can go through the
VPN, and how to encrypt and authenticate the traffic. This
agreement is called a Security Association.
• The Phase 1 and Phase 2 configurations must match for the devices
on either end of the tunnel.

© 2013 Cisco and/or its affiliates. All rights reserved. Cisco Public 53
Site-to-Site IPsec VPN Topology

© 2013 Cisco and/or its affiliates. All rights reserved. Cisco Public 54
IPsec VPN Configuration Tasks

XYZCORP Security Policy Configuration Tasks


Encrypt traffic with AES 256 and SHA 1. Configure the ISAKMP policy for IKE Phase 1
Authentication with PSK 2. Configure the IPsec policy for IKE Phase 2
Exchange keys with group 24 3. Configure the crypto map for IPsec policy
ISAKMP tunnel lifetime is 1 hour 4. Apply the IPsec policy
IPsec tunnel uses ESP with a 15-min. lifetime 5. Verify the IPsec tunnel is operational

© 2013 Cisco and/or its affiliates. All rights reserved. Cisco Public 55
Existing ACL Configurations

ACL Syntax for


IPsec Traffic

© 2013 Cisco and/or its affiliates. All rights reserved. Cisco Public 56
Existing ACL Configurations (Cont.)

Permitting Traffic for IPsec Negotiations

© 2013 Cisco and/or its affiliates. All rights reserved. Cisco Public 57
Introduction to GRE Tunnels

© 2013 Cisco and/or its affiliates. All rights reserved. Cisco Public 58
Topic 4.3.2:
ISAKMP Policy

© 2013 Cisco and/or its affiliates. All rights reserved. Cisco Public 59
The Default ISAKMP Policies

© 2013 Cisco and/or its affiliates. All rights reserved. Cisco Public 60
Syntax to Configure a New ISAKMP Policy

© 2013 Cisco and/or its affiliates. All rights reserved. Cisco Public 61
XYZCORP ISAKMP Policy Configuration

© 2013 Cisco and/or its affiliates. All rights reserved. Cisco Public 62
Configuring a Pre-Shared Key

The crypto isakmp key Command

© 2013 Cisco and/or its affiliates. All rights reserved. Cisco Public 63
Configuring a Pre-Shared Key (Cont.)
Pre-Shared Key Configuration

© 2013 Cisco and/or its affiliates. All rights reserved. Cisco Public 64
Topic 4.3.3:
IPsec Policy

© 2013 Cisco and/or its affiliates. All rights reserved. Cisco Public 65
Define Interesting Traffic
The IKE Phase 1 Tunnel Does Not Exist Yet

© 2013 Cisco and/or its affiliates. All rights reserved. Cisco Public 66
Define Interesting Traffic (Cont.)
Configure an ACL to Define Interesting Traffic

© 2013 Cisco and/or its affiliates. All rights reserved. Cisco Public 67
Configure IPsec Transform Set
The crypto ipsec transform-set Command

© 2013 Cisco and/or its affiliates. All rights reserved. Cisco Public 68
Configure IPsec Transform Set (Cont.)
The crypto ipsec transform-set Command

© 2013 Cisco and/or its affiliates. All rights reserved. Cisco Public 69
Topic 4.3.4:
Crypto Map

© 2013 Cisco and/or its affiliates. All rights reserved. Cisco Public 70
Syntax to Configure a Crypto Map

© 2013 Cisco and/or its affiliates. All rights reserved. Cisco Public 71
Syntax to Configure a Crypto Map (Cont.)
Crypto Map Configuration Commands

© 2013 Cisco and/or its affiliates. All rights reserved. Cisco Public 72
XYZCORP Crypto Map Configuration
Crypto Map Configuration:

© 2013 Cisco and/or its affiliates. All rights reserved. Cisco Public 73
XYZCORP Crypto Map Configuration (Cont.)
Crypto Map Configuration:

© 2013 Cisco and/or its affiliates. All rights reserved. Cisco Public 74
Apply the Crypto Map

© 2013 Cisco and/or its affiliates. All rights reserved. Cisco Public 75
Topic 4.3.5:
IPsec VPN

© 2013 Cisco and/or its affiliates. All rights reserved. Cisco Public 76
Send Interesting Traffic

Use Extended Ping to Send Interesting Traffic

© 2013 Cisco and/or its affiliates. All rights reserved. Cisco Public 77
Verify ISAKMP and IPsec Tunnels
Verify the ISAKMP Tunnel is Established

© 2013 Cisco and/or its affiliates. All rights reserved. Cisco Public 78
Verify ISAKMP and IPsec Tunnels (Cont.)
Verify the IPsec Tunnel is Established

© 2013 Cisco and/or its affiliates. All rights reserved. Cisco Public 79
Section 4.4:
Summary
Chapter Objectives:
• Explain the purpose of VPNs.

• Explain how IPsec VPNs operate.

• Configure a site-to-site IPsec VPN, with pre-shared key authentication,


using the CLI.

© 2013 Cisco and/or its affiliates. All rights reserved. Cisco Public 80
Thank you.
Instructor Resources

• Remember, there are


helpful tutorials and user
guides available via your
NetSpace home page. 1
(https://www.netacad.com) 2
• These resources cover a
variety of topics including
navigation, assessments,
and assignments.
• A screenshot has been
provided here highlighting
the tutorials related to
activating exams, managing
assessments, and creating
quizzes.

© 2013 Cisco and/or its affiliates. All rights reserved. Cisco Public 82

You might also like