Dead Peer Detection
Detection Dead Peer? Sudden failure of the VPN peer during
communication. Since VPN gateway does not typically initiating traffic
it does not notice if or when the VPN has failed.
Solution to Dear Peer? Configure DPD on Gateway DPD sends UDP messages
at defined intervals, and if messages are not responded to, the peer is
considered to be down.
Exception to DPD DPD is used when dynamic routing is not used(e.g.,
OSPF), because dynamic routing protocols can both detect a failure and
default over to another path without the need for DPD.
Nonce
Nonce is a random number generated by each peer during IKE negotiation
phase to prevent replay attacks
Each peer generates its own nonce and includes it in the IKE messages.
PFS / Perfact forward Secrecy
What? Renegotiating Phase-1 keys,encryption-algos,auth-algos AGAIN
before proceeding to negotiate Phase-1
Why? keys exchanged in phase-1 are found at risk, particularly in
Aggressive mode, because IKE identities are sent in the clear.
How? New DH-keys are formed in IKEv1-Phase-1. New keys are generated
using new Nonces exchanged between the peers. If PFS is enabled in IKE
Phase-2. Then New Key is generated in Phase-2.
SA(Security Association)
SA/Connection is identified by security attributes(Eg: encryption key,
encryption algorithm) between IPSec peers.
Bidirectional communication requires at least two SAs, one for each
direction.
Since there are 2 stages in establishing IPSec tunnel there are 2 types
of SAs.
Cookie, SPI
| IKE SA | IPsec SA | |
|---|---|---|
| Usage | IKE SA is used for exchanging IPSec SA | IPSec SA is used for encryption of user traffic |
| Content |
BRIEF:
DETAILED:
|
BRIEF:
DETAILED:
|
SAD(Security Association DB)
Database which Stores SAs
SPI(SECURITY PARAMETER INDEX)
eg:7C123A9C
This tag helps the Peers to distinguish between two IPSec streams. For
Example: if there were 2 different IPSEC flows between 2 peers, each
using a different secret key, the SPI would allow each peer to determine
which key to use on each packet.
Can SPI be same as cookie? Yes
Where is used? It should be present in IPSec SA. An SPI has only local
significance, since it is defined by the creator of the SA.
SP / Security Policy
SP Format
Node 3 2
SA sa1 transport 192.168.2.2 ESP 1234
-E DES_CBC "Auth-Key"
-A HMAC_MD5 "encrypt-key"
SP NA-1.0//src NA-5.0//dst ANY -P OUT IPSEC sa1
SP 192.168.1.0 192.168.5.0 UDP -P IN IPSEC sa1