IPSec - Basics Handouts
IPSec - Basics Handouts
APNIC eLearning:
IPSec Basics
08 May 2013
02:30 pm Brisbane Time (GMT+10)
Introduction
• Presenter Sheryl Hermoso
Training Officer
[email protected]
Specialties:
Network Security
IPv6
DNS/DNSSEC
Internet Resource Mgmt
1
7/05/13
IPSec
• Provides Layer 3 security (RFC 2401)
– Transparent to applications (no need for integrated IPSec support)
2
7/05/13
Why IPSec?
• Internet Protocol (IP) is not secure
– IP protocol was designed in the early stages of the Internet where
there security is not an issue
– All hosts in the network are known
IPSec Standards
• RFC 2401 “The IP Security Architecture”
– Defines the original IPsec architecture and elements common to both AH and
ESP
• RFC 2402
– Defines authentication headers (AH)
• RFC 2406
– Defines the Encapsulating Security Payload (ESP)
• RFC 2409
– IKE v1 – ISAKMP
• RFC 5996
– IKE v2 (Sept 2010)
• Updated documents [in RFC editor queue]
– Draft-ietf-ipsec-rfc2401bis-06 (architecture)
– Draft-ietf-ipsec-rfc2402bis-10 (AH)
– Draft-ietf-ipsec-esp-v3-10 (ESP)
– Draft-ietf-ipsec-ikev2-17 (IKEv2)
3
7/05/13
Benefits of IPSec
• Offers Confidentiality (encrypting data), Integrity , and
Authentication
• Data integrity and source authentication
– Data “signed” by sender and “signature” is verified by the recipient
– Modification of data can be detected by signature “verification”
– Because “signature” is based on a shared secret, it gives source
authentication
• Anti-replay protection
– Optional; the sender must provide it but the recipient may ignore
• Key management
– IKE – session negotiation and establishment
– Sessions are rekeyed or deleted automatically
– Secret keys are securely established and authenticated
– Remote peer is authenticated through varying options
Source Destination
4
7/05/13
IPSec Modes
• Tunnel Mode
– Entire IP packet is encrypted and becomes the data component of a
new (and larger) IP packet.
– Frequently used in an IPsec site-to-site VPN
• Transport Mode
– IPSec header is inserted into the IP packet
– No new packet is created
– Works well in networks where increasing a packet’s size could cause
an issue
– Frequently used for remote-access VPNs
IP IP
IPsec TCP Transport Mode
Header Header Header
Payload
IPSec
Tunnel Mode
IPSec
5
7/05/13
IPSec Architecture
AH
Security Protocols
Authentication Header
Encapsulating Security
Payload
IKE
• An SA is unidirectional
– Two SAs required for a bidirectional communication
6
7/05/13
How to Set Up an SA
• Manually
– Sometimes referred to as “manual keying”
– You configure on each node:
• Participating nodes (I.e. traffic selectors)
• AH and/or ESP [tunnel or transport]
• Cryptographic algorithm and key
• Automatically
– Using IKE (Internet Key Exchange)
13
ISAKMP
• Internet Security Association and Key Management
Protocol
• Defined by RFC 2408
• Used for establishing Security Associations (SA) and
cryptographic keys
• Only provides the framework for authentication and key
exchange, but key exchange independent
• Key exchange protocols
– Internet Key Exchange (IKE) and Kerberized Internet Negotiation of
Keys (KINK)
7
7/05/13
8
7/05/13
Original
Without AH IP Header TCP/UDP Data
Original AH
With AH Header TCP/UDP Data
IP Header
Encrypted
Authenticated
9
7/05/13
• ToS
• TTL
• Header Checksum
• Offset
• Flags
Encrypted
Authenticated
10
7/05/13
IKE Modes
Mode Description
Main mode Three exchanges of information between IPsec peers.
Initiator sends one or more proposals to the other peer
(responder)
Responder selects a proposal
Aggressive Mode Achieves same result as main mode using only 3 packets
First packet sent by initiator containing all info to establish
SA
Second packet by responder with all security parameters
selected
Third packet finalizes authentication of the ISAKMP
session
Quick Mode Negotiates the parameters for the IPsec session.
Entire negotiation occurs within the protection of ISAKMP
session
11
7/05/13
• Phase II
– Establishes a secure channel between computers intended for the
transmission of data (IPsec SA)
– Using quick mode
Overview of IKE
1 IPsec Peer IPsec Peer
Traffic which needs 2
to be protected IKE Phase 1
IKE Phase 2
3
IPsec Tunnel
12
7/05/13
Internet
13
7/05/13
27
28
14
7/05/13
29
15
7/05/13
Questions
• Please remember to fill out the
survey
– http://surveymonkey.com/s/
apnic-20130508-eL3
16
7/05/13
Thank You!
End of Session
17