CSN11109
CSN11109
Network Security
Transport Layer - Control at this layer can be used to protect the data in a
single communication session between two hosts. The most common use
for transport layer protocols is securing HTTP traffic; the Transport Layer
Security (TLS) protocol is usually used for this.
Data link layer - control are applied to all communications on a specific physical
link. Data link layer controls for dedicated circuits are most often provided
by specialized hardware devices known as data link encryptors.
VPN Overview
Virtual Private Networks
© 2021 Cisco and/or its affiliates. All rights reserved. Cisco Confidential
VPN Overview
VPN Benefits
Modern VPNs now support encryption features, such as Internet Protocol Security
(IPsec) and Secure Sockets Layer (SSL) VPNs to secure network traffic between sites.
Major benefits of VPNs are shown in the table.
Benefit Description
Cost Savings With the advent of cost-effective, high-bandwidth technologies,
organizations can use VPNs to reduce their connectivity costs while
simultaneously increasing remote connection bandwidth.
© 2021 Cisco and/or its affiliates. All rights reserved. Cisco Confidential
VPN Topologies
Site-to-Site and Remote-Access VPNs (Cont.)
A remote-access VPN is dynamically created to establish a secure
connection between a client and a VPN terminating device. For example,
a remote access SSL VPN is used when you check your banking
information online.
© 2021 Cisco and/or its affiliates. All rights reserved. Cisco Confidential
VPN Topologies
Remote-Access VPNs
Remote-access VPNs are typically enabled dynamically by the user when
required.
Remote access VPNs can be created using either IPsec or SSL.
A remote user must initiate a remote access VPN connection.
The figure displays two ways that a remote user can initiate a remote access
VPN connection: clientless VPN and client-based VPN.
© 2021 Cisco and/or its affiliates. All rights reserved. Cisco Confidential
VPN Topologies
Difference between Site-to-Site VPN and Remote Access VPN
Definition Site-to-Site VPN is a type of VPN in Remote Access VPN is a type
which an entire network gets of VPN in which the multiple
connected under a secure shared resources from different
gateway so that the data can be sent locations get connected with a
and received with authentication. single private network using
various VPN client software
and gateways.
Network Setup In Site-to-Site VPN, only the In case of Remote Access VPN,
network of locations gets connected each client needs to set up the
via a secure tunnel and hence there is network which is required to
no need to set up a network for each get connected with the secure
client to access the target network. target network.
The VPN tunnel setup does not have Each remote access user must
to be initiated by every user. initiate the VPN tunnel
configuration.
VPN Topologies
Difference between Site-to-Site VPN and Remote Access VPN
Remote Access VPNs and Site-to-Site VPNs may sound similar, yet they serve very
different functions.
The most important point that you should note here is that a Remote Access VPN
connects remote users from any location to a corporate network, whereas a Site-to-Site
VPN connects individual networks with each other to create a shared network
VPN Topologies
SSL VPNs
SSL uses the public key infrastructure and digital certificates to authenticate peers.
Both IPsec and SSL VPN technologies offer access to virtually any network
application or resource.
If support and ease of deployment are the primary issues, consider SSL.
The type of VPN method implemented is based on the access requirements of the users
and the organization’s IT processes. The table compares IPsec and SSL remote access
deployments.
12
© 2021 Cisco and/or its affiliates. All rights reserved. Cisco Confidential
VPN Topologies
SSL VPNs
Feature IPsec SSL
Applications Extensive - All IP-based Limited - Only web-based
supported applications are supported. applications and file sharing are
supported.
Authentication Strong - Uses two-way Moderate - Using one-way or
strength authentication with shared keys or two-way authentication.
digital certificates.
Encryption Strong - Uses key lengths from 56 Moderate to strong - With key
strength bits to 256 bits. lengths from 40 bits to 256 bits.
13
Connection Limited - Only specific devices Extensive - Any device with a
option with specific configurations can web browser can connect.
connect. © 2021 Cisco and/or its affiliates. All rights reserved. Cisco Confidential
IPsec Overview
© 2021 Cisco and/or its affiliates. All rights reserved. Cisco Confidential
IPsec Overview
IPsec Technologies
IPsec Protocol The choices for IPsec Protocol include Authentication Header (AH) or Encapsulation
Security Protocol (ESP). AH authenticates the Layer 3 packet. ESP encrypts the Layer 3
packet. Note: ESP+AH is rarely used as this combination will not successfully traverse a
NAT device.
Confidentiality Encryption ensures confidentiality of the Layer 3 packet. Choices include Data
Encryption Standard (DES), Triple DES (3DES), Advanced Encryption Standard (AES),
or Software-Optimized Encryption Algorithm (SEAL).
Integrity Ensures that data arrives unchanged at the destination using a hash algorithm, such as
message-digest 5 (MD5) or Secure Hash Algorithm (SHA).
Authentication IPsec uses Internet Key Exchange (IKE) to authenticate users and devices that can carry
out communication independently. IKE uses several types of authentication, including
username and password, one-time password, biometrics, pre-shared keys (PSKs), and
digital certificates using the Rivest, Shamir, and Adleman (RSA) algorithm.
16
Diffie-Hellman IPsec uses the DH algorithm to provide a public key exchange method for two peers to
establish a shared secret key. There are several different groups to choose from
including DH14, 15, 16 and DH 19, 20, 21 and 24. DH1, 2 and 5 are no longer
© 2021 Cisco and/or its affiliates. All rights reserved. Cisco Confidential
recommended.
IPsec Overview
Common VPN Tunnelling Technologies and
Protocols
Internet Security Protocol (IPSec)
IPsec was developed by IETF (the Internet Engineering Task Force)
for secure transfer of information at the OSI layer three across a
public unprotected IP network, such as the Internet.
IPsec enables a system to select and negotiate the
required security protocols, algorithm(s) and secret keys to be
used for the services requested.
IPsec provides basic authentication, data integrity and
encryption services to protect unauthorised viewing and
modification of data.
It makes use of two security protocols, AH (Authentication
header) and ESP (Encapsulated Security Payload), for
required services. However, IPsec is limited to only sending IP
packets
IPsec Overview
IPsec Protocol Encapsulation
18
© 2021 Cisco and/or its affiliates. All rights reserved. Cisco Confidential
IPsec Overview
Confidentiality
19
© 2021 Cisco and/or its affiliates. All rights reserved. Cisco Confidential
IPsec Overview
Integrity
© 2021 Cisco and/or its affiliates. All rights reserved. Cisco Confidential
IPsec Overview
Authentication
21
© 2021 Cisco and/or its affiliates. All rights reserved. Cisco Confidential
IPsec Overview
Authentication (Cont.)
IPsec has two ways of authenticating a peer--via a pre-shared key or a certificate. While pre-
shared keys are easier to work with, they are generally considered less secure than a certificate.
The RSA-encrypted nonces method uses the RSA encryption public key cryptography standard.
It requires that each party generate a pseudo-random number (a nonce) and encrypt it in the
other party's RSA public key.
Authentication occurs when each party decrypts the other party's nonce with a local private key
(and other publicly and privately available information) and then uses the decrypted nonce to 22
© 2021 Cisco and/or its affiliates. All rights reserved. Cisco Confidential
IPsec Overview
Secure Key Exchange with Diffie-Hellman
© 2021 Cisco and/or its affiliates. All rights reserved. Cisco Confidential
IPsec Protocols
© 2021 Cisco and/or its affiliates. All rights reserved. Cisco Confidential
IPsec Protocols
IPsec Protocol Overview
© 2021 Cisco and/or its affiliates. All rights reserved. Cisco Confidential
IPsec Protocols
Authentication Header
IPsec makes use of the AH and ESP protocols to provide security services
AH (Authentication Header) protocol.
Provides source authentication, and integrity of IP packets, but it does
not have encryption.
Operates on top of IP using protocol 51
An AH header added to the IP packet contains a hash of the data,
a sequence number etc., and information that can be used to verify the
sender, ensure data integrity and prevent replay attacks.
IPsec Protocols
Encapsulation Security Protocol
If ESP is selected as the IPsec protocol, an encryption algorithm must also be selected.
The default algorithm for IPsec is 56-bit DES.
ESP can also provide integrity and authentication.
First, the payload is encrypted. Next, the encrypted payload is sent through a hash
algorithm.
The hash provides authentication and data integrity for the data payload.
Optionally, ESP can also enforce anti-replay protection which verifies that each packet is
unique and is not duplicated. This protection ensures that a hacker cannot intercept packets
and insert changed packets into the data stream.
Anti-replay works by keeping track of packet sequence numbers and using a sliding
window on the destination end.
When a connection is established between a source and destination, their counters are
initialized at zero. Each time a packet is sent, a sequence number is appended to the packet
by the source. The destination uses the sliding window to determine which sequence 27
numbers are expected. The destination verifies that the sequence number of the packet is
not duplicated and is received in the correct order.
© 2021 Cisco and/or its affiliates. All rights reserved. Cisco Confidential
IPsec Protocols
Encapsulation Security Protocol
ESP (Encapsulated Security Payload) protocol.
Provides data confidentiality, in addition to source authentication and
integrity. ESP uses symmetric encryption algorithms, such as 3DES, to
provide data privacy.
Uses IP protocol 50
The algorithm needs to be the same on both communicating peers.
ESP can also support encryption-only or authentication-only
configurations.
IPsec Protocols
ESP Encrypts and Authenticates
© 2021 Cisco and/or its affiliates. All rights reserved. Cisco Confidential
IPsec Protocols
IPsec Protocols
Transport and Tunnel Modes
Each security protocol supports two modes of operation:
© 2021 Cisco and/or its affiliates. All rights reserved. Cisco Confidential
IPsec Protocols
Mode of Operation
Transport mode
ESP ESP
IP HDR ESP HDR Data Trailer Auth
Encrypted
Authenticated
Tunnel mode
ESP ESP
New IP HDR ESP HDR IP HDR Data Trailer Auth
Encrypted
Authenticated
IPsec Protocols
NAT Traversal and PAT
Network Address Translation (NAT) involves changes in packet headers to
allow private IP addresses to be translated in to global routable address.
Port Address Translation (PAT), is an extension to NAT which allows multiple devices
on a local area network (LAN) to be mapped to a single public IP address. The goal of
PAT is to conserve IP addresses.
Any attempt to perform a NAT / PAT operation on IPsec packets creates issues, because
IPsec authenticates all packets in Tunnel Mode. This means that packets must remain
unaltered for the sake of data integrity. If you need to translate TCP or UDP
communications from hosts on a private network to hosts on a public network and vice
versa, you must use NAT Traversal. If enabled, NAT Traversal inserts a UDP header
with destination port 4500 right before the ESP header. The inserted UDP header can be
translated (modified), while keeping the original IP header intact (illustrated below).
This way, the packet can reach its final destination intact.
NAT Traversal and PAT
Internet Key Exchange
© 2021 Cisco and/or its affiliates. All rights reserved. Cisco Confidential
Internet Key Exchange
The IKE Protocol
© 2021 Cisco and/or its affiliates. All rights reserved. Cisco Confidential
Internet Key Exchange
Phase 1 and 2 Key Negotiation
© 2021 Cisco and/or its affiliates. All rights reserved. Cisco Confidential
Internet Key Exchange
Phase 2: Negotiating SAs
IKE Phase 2 is called quick mode and can only occur after IKE has established a secure
tunnel in Phase 1.
Quick mode negotiates the IKE Phase 2 SAs.
In this phase, the SAs that IPsec uses are unidirectional; therefore, a separate key
exchange is required for each data flow.
42
© 2021 Cisco and/or its affiliates. All rights reserved. Cisco Confidential
Internet Key Exchange
IPsec supports two types of key management over the Internet: automated and
manual
Automated Key Management
IKE (Internet Key Exchange) is the default protocol used in IPsec to
determine and negotiate protocols, algorithms and keys, and to
authenticate the two parties. It is useful for widespread, scalable
deployments and implementations of VPN.
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.
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.
Negotiates a matching IKE SA policy between peers to protect the IKE exchange
IKE phase 1 occurs in two modes: main mode and aggressive mode. These modes are
described in the following sections.
Internet Key Exchange
Step 2 - IKE Phase 1
Host A Host B
Router A Router B
IKE Phase 1
10.0.1.3 10.0.2.3
Diffie-Hellman Diffie-Hellman
exchange exchange
Host A Host B
Router A Router B
Policy 10 Policy 15
DES DES
MD5 MD5
pre-share IKE Policy Sets pre-share
DH1 DH1
lifetime lifetime
Policy 20
3DES
SHA
pre-share
DH1
lifetime
4ehIDx67NMop9eR 4ehIDx67NMop9eR
Internet
U78IOPotVBn45TR U78IOPotVBn45TR
Internet Key Exchange
Authenticate Peer Identity
Remote office
Corporate office
Internet
HR servers
Peer authentication
Peer authentication methods
– Pre-shared keys
– RSA signatures (Rivest-Shamir Adelman Algorithm) -is an asymmetric
algorithm that is commonly used for generating and verifying digital signatures.
– RSA encrypted nonces
Internet Key Exchange
Step 3 - IKE Phase 2
The purpose of IKE phase 2 is to negotiate IPSec SAs to set up the IPSec tunnel.
IKE phase 2 performs the following functions:
•Negotiates IPSec SA parameters protected by an existing IKE SA
•Establishes IPSec security associations
•Periodically renegotiates IPSec SAs to ensure security
•Optionally performs an additional Diffie-Hellman exchange
Host A Host B
Router A Router B
Host A Host B
Router A Router B
Transform set 40
ESP
• A transform set is a combination
DES
MD5
of algorithms and protocols that
Tunnel
Lifetime
enact a security policy for traffic.
Internet Key Exchange
Step 4 - IPSec Session
After IKE phase 2 is complete and quick mode has established IPSec
SAs, information is exchanged via an IPSec tunnel.
Packets are encrypted and decrypted using the encryption specified
in the IPSec SA.
Host A Host B
Router A Router B
IPSec session
IPSec tunnel
A tunnel is terminated
By an SA lifetime timeout
Site 1 Site 2
RouterA RouterB
Internet
10.0.1.3 10.0.2.3
E0/1 172.30.1.2 E0/1 172.30.2.2
router#
show crypto ipsec transform-set
Site 1 Site 2
RouterA RouterB
Internet
10.0.1.3 10.0.2.3
E0/1 172.30.1.2 E0/1 172.30.2.2
router#
show crypto map
• View the currently configured crypto maps.
router#
debug crypto ipsec
router#
debug crypto isakmp
© 2021 Cisco and/or its affiliates. All rights reserved. Cisco Confidential
VPNs Summary
What Did I Learn in this Module?
66
© 2021 Cisco and/or its affiliates. All rights reserved. Cisco Confidential
VPNs Summary
What Did I Learn in this Module? (Cont.)
• The IKE protocol is a key management protocol standard that is used to automatically
negotiate IPsec security associations and enable IPsec secure communications.
• IKE uses ISAKMP for phase 1 and phase 2 of key negotiation. Phase 1 negotiates a security
association (a key) between two IKE peers. During phase 2 negotiation, IKE establishes keys
(security associations) for other applications, such as IPsec.
67
© 2021 Cisco and/or its affiliates. All rights reserved. Cisco Confidential
ANY QUESTIONS ...