Professional Documents
Culture Documents
Olga Torstensson
IDE
Halmstad University
1
What is a VPN?
2
VPN Taxonomy
3
Virtual Private Networks (VPNs)
4
Why Have VPNs?
5
Tunneling and Encryption
6
Plaintext, Encryption,
Ciphertext, and Decryption
Encryption Note:
Key Interceptor Cannot Read
Ciphertext Without the
Decryption Key
Plaintext Encryption Ciphertext “11011101”
“Hello” Method &
Key Interceptor
Network
Decryption
Key
Party B
7
Use VPNs with a Variety of Devices
8
VPN Types
Remote Access VPN Solutions
9
Site-to-Site VPN Solutions
10
VPN Types and Applications
Type Application As Alternative To Benefits
Site-
Site-to-
to-Site Leased Line
Site-
Site-to-
to-Site Extend Connectivity
Internal Frame Relay Increased Bandwidth
VPN
Connectivity ATM Lower Cost
External Fax
Extranet Facilitates
Connectivity Mail
VPN E-Commerce
11
VPN Requirements Vary By
Application
Extranet
Business Partner
Mobile User
POP
Internet VPN
DSL
Cable Central Site
Home Telecommuter
Site-to-Site
Remote Office
12
Tunneling Protocols
13
VPN Protocols
14
Selecting Layer 3 VPN Tunnel Options
15
Identifying VPN and IPSec Terms
• Tunnel
• Encryption/Decryption
• Cryptosystem
• Hashing
• Authentication
• Authorization
• Key Management
• Certificate of Authority Service
16
Identifying VPN and IPSec Terms
IPSec main protocols are used to provide
protection for user data:
• Authentication Header – AH
• Encapsulating Security Payload – ESP
17
Cryptographic System
Secure Communication
Confidentiality
Authentication
Message Integrity
Anti-Replay Protection
Client PC with Server with
Cryptographic Cryptographic
System Provided System
Software Automatically Software
18
Cryptosystem Overview
19
Symmetric Encryption
20
Asymmetric Encryption
21
RSA
22
RSA
23
RSA
24
RSA encryption (privacy)
Alice Bob
Encrypted Clear
Encryption Decryption
Pub
Pri
25
RSA signatures (authentication)
Alice Bob
Pri Pub
26
Key Exchange – Diffie-Hellman
Algorithm
27
The Diffie-Hellman algorithm
28
Modular Exponentiation
Both g and p Are Shared and Well-Known
• Generator, g
• Modulus (prime), p
• Y = gX mod p
29
Diffie-Hellman Key Exchange
Private Value, XA Private Value, XB
Alice Public Value, YA Public Value, YB Bob
XA XB
YA =g mod p YB = g mod p
YA
YB
X XA XB XB
YB A mod p = g mod p = YA mod p
(shared secret)
30
Hashing
• Hashing is a one-way function. It cannot
be reversed
– From the hash, you cannot compute the
original message
• Hashing is repeatable
– If two parties apply the same hashing method
to the same bit string, they will get the same
hash
31
Hashing
32
Encryption Versus Hashing
Encryption Hashing
Output is of a fixed
Length of Output is similar in
short length,
Result length to input
regardless of input
33
Tunnel Versus Transport Mode
34
IPsec Operation: Tunnel and
Transport Modes
Transport Mode
Site Site
Network Network
Secure Connection
35
IPsec Operation: Tunnel and
Transport Modes
Tunnel Mode
IPsec IPsec
Site Server Server Site
Tunneled Network
Network
Connection
No No
No No
Security Secure on Security
Extra Extra
in Site the Internet in Site
Software Software
Network Network
36
IPsec Operation: Tunnel and
Transport Modes
Transport Mode
Tunnel Mode
37
IPsec ESP and AH Protection
Confidentiality
Encapsulating
Security IP ESP ESP
Protected
Payload Header Header Trailer
Protocol = 51
Authentication IP Authentication
Protected
Header Header Header
38
IPSec Security Protocols
39
Modes and Protections
ESP AH
Confidentiality Authentication
Authentication Integrity
Integrity
40
IPSEC Concepts
• Peers
• Transform sets
• Security Associations
• Transport and Tunnel modes
• Authentication Header (AH) &
Encapsulating Security Payload (ESP)
41
Peers
A peer of an IPSEC device is another device participating in
IPSEC. A peer can be a router, firewall, server or some
remote PC with IPSEC support.
Peering between two IPSEC device is usually a point to point
relationship
Remote office
Corporate Office
Internet
HR
servers
Peer
authentication
• Peer authentication
methods:
– Pre-shared keys Peer Authentication
– RSA signatures
42
Transform Sets
• A transform set is a list of IPsec protocols and
cryptographic algorithms that a peer can accept.
Because IPsec allows for the use of different
protocols and algorithms, a peer needs to declare
and negotiate with other peers what it can support.
43
A Transform Set
• An IPsec security protocol, AH or ESP
or both
• An integrity/Authentication algorithm
ie MD5 HMAC or SHA-1 HMAC
44
Security Association
• A Security Association (SA) is a
logical connection that provides
data flowing from one peer to
another by using a transform set.
Security associations are like
logical tunnels between peers.
Traffic entering an SA is protected
and transported to the other side.
45
IPsec Security Associations
2. Security Association (SA)
for Transmissions from A to B
46
Security Association
47
Establishing IPsec Security
Associations Using IKE
48
Five steps of IPSec
49
Task – Prepare for IKE and IPSec
50
Determine IKE (IKE Phase 1) Policy
51
IKE Phase 1 Policy Parameters
52
Determine IPSec (IKE Phase 2) Policy
• Determine the following policy details:
– IPSec algorithms and parameters for optimal security
and performance
– Transforms and, if necessary, transform sets
– IPSec peer details
– IP address and applications of hosts to be protected
– Manual or IKE-initiated SAs
53
IPSec Transforms Supported in
Cisco IOS Software
54
Authentication Header
55
Encapsulating Security Payload
56
IPSec Policy Example
57
Identify IPSec Peers
58
Check Current Configuration
59
Ensure the Network Works
60
Ensure ACLs are Compatible with IPSec
61
Task – Configure IKE
• Task 2 – Configure IKE
– Step 1 – Enable or disable IKE.
• crypto isakmp enable
– Step 2 – Create IKE policies.
• crypto isakmp policy
– Step 3 – Configure ISAKMP.
• crypto isakmp identity
– Step 4 – Configure pre-shared keys.
• crypto isakmp key
– Step 5 – Verify the IKE configuration.
• show crypto isakmp policy
62
Enable IKE
63
Create IKE policies
64
Create IKE Policies with the
crypto isakmp Command
65
IKE Policy Negotiation
66
Configure Pre-shared Keys
67
Verify IKE Configuration
68
Configure IPSec
• Task 3 – Configure IPSec
– Step 1 – Configure transform set suites.
• crypto ipsec transform-set
– Step 2 – Configure global IPSec SA lifetimes.
• crypto ipsec security-association lifetime
– Step 3 – Create crypto ACLs using extended access
lists
– Step 4 – Configure IPSec crypto maps.
• crypto map
– Step 5 – Apply crypto maps to interfaces.
• crypto map map-name
69
Configure Transform Set Suites
70
Transform Set Negotiation
71
Configure Global IPSec Security
Association Lifetimes
72
Configure Global IPSec Security
Association Lifetimes
73
Purpose of Crypto ACLs
74
Create Crypto ACLs Using Extended
Access Lists
75
Create Crypto ACLs Using Extended
Access Lists
76
Configure Symmetrical Peer Crypto
ACLs
77
Purpose of Crypto Maps
• Crypto maps pull together the various parts
configured for IPSec, including:
– The traffic to be protected by IPSec and a set of SAs
– The local address to be used for the IPSec traffic
– The destination location of IPSec-protected traffic
– The IPSec type to be applied to this traffic
– The method of establishing SAs, either manually or
by using RSA
– Other parameters needed to define an IPSec SA
78
Crypto Map Parameters
79
Configure IPSec Crypto Maps
80
Example Crypto Map Commands
81
Apply Crypto Maps to Interfaces
82
IPSec Configuration Examples
83
Test and Verify IPSec
– Display configured IKE policies.
• show crypto isakmp policy
• (show isakmp policy on a PIX)
– Display configured transform sets.
• show crypto ipsec transform-set
– Display phase | security associations.
• show crypto isakmp sa
• (show isakmp sa on a PIX)
84
Generic Routing Encapsulation
GRE
85
Reasons for using GRE over
IPsec
– To pass multicast and broadcast traffic across
the tunnel securely
– To pass non-IP traffic securely
– To provide resiliency
– To assist in saving memory and CPU cycles
in the router, by reducing the number of SA
that need to be set up
86
Secure GRE Tunnels
IPsec provides what GRE lacks:
•Confidentiality through encryption using symmetric
algorithms
•Data source authentication using HMACs Data
integrity verification using HMACs
IPsec is not perfect at tunneling:
•Older IOS 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 use of routing protocols across the tunnel
•IPsec does not tunnel IP protocols; GRE does
87
GRE over IPsec
88
GRE over IPsec Encapsulation
89