IPSec VPN Configuration
May 29, 2012
FACT SHEET – VPN IPSEC (Cisco based)
- Understanding VPN components – IPSec and encryption (data integrity)
- Defining a VPN
- Understanding the need for encryption
- Types of encryption
- VPN benefits
- Cheaper connections
- Available anywhere
- Heavily encrypted and secure
- Many to many connection
- The world of IPSec
- Authentication
- Data Integrity
- Confidentiality
- Anti-Replay
- IPSec components
- Negotiation protocol – AH, ESP
- Encryption – DES, 3DES, AES
- Authentication – MD5, SHA-1
- Protection – DH1, 2,5,7
- IPSec modes of communication
- Transport mode
- Tunnel mode
- Two types of encryption keys
- Symmetric and asymmetric keys.
- Security over public network.
- Mixed approach.
- Encryption algorithms used today.
- DES(64/56), 3DES(168), AES(128,192,256), RSA(512, 768, 1024) and DH(768, 1024, 1536).
Key IPSec negotiation protocol
- AH – Authentication, data integrity
- ESP – Encryption, authentication, data integrity.
IPSec Negotiation process
- Interesting traffic triggers VPN
- IKE phase1
- IKE phase2
- Data transfer
- VPN teardown
Interesting traffic decision
- Encrypt using IPSec
- Send in clear text
- Discard.
IKE Phase1
- Exchange the negotiation policy (Policy list [pres, dh, aes…])
- Exchange DH keys
- Identity verification
IKE phase2
- IPSec transform set and encryption keys negotiated and exchanged.
- Lifetime.
Designing IKE phase1 (IKE phase 1 focuses on establishing authentication and a secure tunnel for IKE phase2 exchange)
- Required elements
- Remote peer IP or hostname
- Key distribution method
- Authentication method
- Encryption algorithm
- Hash algorithm
- Lifetime
| Side A IKE1 Parameters | Side B IKE1 Parameters | ||
| Encryption | AES-128 | Encryption | AES-128 |
| Hashing | SHA-1 | Hashing | SHA-1 |
| Authentication | Pre-Shared | Authentication | Pre-Shared |
| DH Level | 2 | DH Level | 2 |
| Lifetime | 86400 | Lifetime | 86400 |
Designing IKE Phase2 policy (IKE2 focuses on establishing secure IPSec tunnel for data transfer).
Required elements
- Transform set
- Interesting traffic designation.
- IPSec crypto-map
| Side A IKE2 Parameters | Side B IKE2 Parameters | ||
| Encryption | ESP-AES | Encryption | ESP-AES |
| Hashing | ESP-SHA-HMAC | Hashing | ESP-SHA-HMAC |
- IKE1 configurations.
Enable ISAKMP: Router(config)#crypto isakmp enable Create ISAKMP Policy: Router(config)#crypto isakmp policy <1-10000> Router(config)#crypto isakmp policy 100
Router(config-isakmp)#encryption aes 128
Router(config-isakmp)#authentication pre-share
Router(config-isakmp)#group 2
Router(config-isakmp)#hash sha
Configure ISAKMP Identity: Router(config)#crypto isakmp identity <address/hostname>
Configure pre-shared keys: Router(config)#crypto isakmp key <key> address <remote_ip>
IKE2 Configurations.
Create transform sets: Router(config)#crypto ipsec transform-set <name> <methods> Router(config)#crypto ipsec transform-set TEST esp-aes 128 esp-sha-hmac (optional) Configure IPSec lifetime: : Router(config)#crypto ipsec <seconds/kilobytes> <value> Create mirrored ACLs defining traffic to be encrypted and the traffic expected to be received encrypted Set up IPSec crypto-map: Router(config)#crypto isakmp map <name> <seq> ipsec-isakmp Router(config)#crypto map TESTING 100 ipsec-isakmp Router(config-crypto-map)#match address <acl> Router(config-crypto-map)#set peer <remote_ip> Router(config-crypto-map)#set pfs <group1/2/5> Router(config-crypto-map)#set transform-set <set>
Verification commands
- show crypto isakmp policy
- show crypto ipsec transform-set
- show crypto ipsec sa
- show crypto map
- debug crypto isakmp
- debug crypto ipsec
Image: http://ccnabolivia.blogspot.com/2016/12/como-configurar-vpn-ipsec-site-to-site.html?spref=pi