Now that we have the IKE framework, we need to decide how the two gateways (or a client and a gateway) prove their identities. In IPsec, this is the 'Authentication' part of the handshake. Depending on the method, your VPN is either a fortress or a screen door.
PSK is the most common method. Both sides are configured with the exact same secret string. While easy to deploy, PSK has a massive scaling problem: if one admin leaks the key, *every* tunnel using that key is compromised. Furthermore, in IKEv1 Aggressive Mode, this key is vulnerable to offline cracking.
๐ก PSK should only be used for temporary lab setups or extremely small environments where keys can be rotated daily.
# Conceptual PSK Configuration
set ike-psk "S3cur3_Pr0t0c0l_2025!"
set peer 203.0.113.10Using X.509 certificates (which we studied in Module 2) is the only secure way to scale IPsec. Each peer has its own private key and a certificate signed by a trusted CA. During the IKE handshake, the peers exchange certificates and sign a challenge. This eliminates the 'Shared Secret' problem and allows for easy revocation.
โ ๏ธ The biggest failure in certificate-based VPNs is neglecting the CRL (Certificate Revocation List) or OCSP. If a laptop is stolen, the certificate must be revoked, or the thief has a permanent key to the network.
| Method | Scalability | Security Level | Key Risk |
|---|---|---|---|
| PSK | Poor | Low/Medium | Key Leakage / Brute-force |
| Certificates | Excellent | Very High | CA Compromise / Revocation failure |
| EAP (Extensible Auth) | High | High | Backend Server (RADIUS) downtime |
For Remote Access VPNs (where employees connect from home), certificates aren't enough. We use EAP (Extensible Authentication Protocol) to integrate with RADIUS or Active Directory. This allows the VPN to require a username, a password, and a TOTP token before the IKE tunnel is fully established.
Avoid using the same PSK for multiple peer-to-peer tunnels. Every single tunnel should have a unique, complex key to prevent a single compromise from collapsing the entire network.
Verify exercises to earn โ 150 XP and unlock next lab level.