Pcornel
Networking · Security

VPN Security

Cheat sheet · https://pcornel.dk/topic.php?topic=766

Back to the Topic

Answer

VPN security protects traffic across untrusted networks with encryption, integrity and authentication. Site-to-site VPNs connect networks; remote-access VPNs connect individual users. IPsec and TLS/SSL are the common technologies.

Remember

Strong choices: IKEv2, AES-GCM, SHA-256 or better, DH group 19/20/21 or 14+, certificates or long random pre-shared keys, MFA for users. Check that routing sends the right traffic into the tunnel, and that NAT does not translate it first.

First checks

  • show crypto ikev2 sa — IKEv2 security associations and their state.
  • show crypto isakmp sa — IKEv1 phase 1 state (QM_IDLE is up).
  • show crypto ipsec sa — IPsec SAs, encrypt and decrypt counters.
  • show crypto session — summary of tunnels and peers.
  • show interfaces tunnel <n> — tunnel interface state for VTI/DMVPN.

Commands

show crypto ikev2 sa detail
show crypto ipsec sa
show dmvpn
show crypto session detail
show vpn-sessiondb anyconnect

Verify in this order

peers reachable (UDP 500/4500, ESP) → IKE proposals match → peers authenticate → IKE SA up → IPsec SAs for the traffic → routing sends traffic into the tunnel → encrypt and decrypt counters increase

Where it usually breaks

underlay IP/transport → control/session registration → route/endpoint distribution → policy/segment → encapsulation/tunnel state → decapsulation/egress → return path

Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=766

Confirmation

Confirm action

Continue?