{"id":469,"date":"2015-03-28T22:00:03","date_gmt":"2015-03-28T22:00:03","guid":{"rendered":"http:\/\/www.balajibandi.com\/?p=469"},"modified":"2017-08-28T19:49:29","modified_gmt":"2017-08-28T18:49:29","slug":"cisco-asa-site-to-site-vpn-between-cisco-asa-cisco-ios-router","status":"publish","type":"post","link":"https:\/\/www.balajibandi.com\/?p=469","title":{"rendered":"Cisco ASA: Site-to-site VPN between Cisco ASA &#038; Cisco IOS Router"},"content":{"rendered":"<h1><strong><span style=\"color: #0000ff;\">My way of journey learning Cisco Security : This article show you how to establish VPN between Cisco ASA and Cisco IOS router.<\/span><\/strong><\/h1>\n<p><strong>Some basics about VPN \u00a0before i proceed to the config :<\/strong><\/p>\n<p align=\"left\"><strong>IKE Phase 1<\/strong><\/p>\n<p align=\"left\">In this phase, the firewalls use the parameters defined in the IKE Gateway configuration and the IKE Crypto profile to authenticate each other and set up a secure control channel. IKE Phase supports the use of preshared keys or digital certificates (which use public key infrastructure, PKI) for mutual authentication of the VPN peers. Preshared keys are a simple solution for securing smaller networks because they do not require the support of a PKI infrastructure. Digital certificates can be more convenient for larger networks or implementations that require stronger authentication security.<\/p>\n<div class=\"xml parbase xml_body_27\">\n<div class=\"body\">The IKE-crypto profile defines the following options that are used in the IKE SA negotiation:<\/div>\n<div><\/div>\n<div><span style=\"font-size: 1rem;\">&#8211; Diffie-Hellman (DH) Group for generating symmetrical keys for IKE. The Diffie Hellman algorithm uses the private key of one party and the public key of the other to create a shared secret, which is an encrypted key that is shared by both VPN tunnel peers. The DH groups supported on the firewall are: Group 1\u2014768 bits; Group 2\u20141024 bits (the default); Group 5\u20141536 bits; Group 14\u20142048 bits<\/span><\/div>\n<div><span style=\"font-size: 1rem;\">&#8211;<\/span><span style=\"font-size: 1rem;\">Authentication options\u2014sha1; sha 256; sha 384; sha 512; md5 &#8211;<\/span><\/div>\n<div><span style=\"font-size: 1rem;\">&#8211; Encryption algorithms\u20143des; aes128; aes192; aes256<\/span><\/div>\n<div><\/div>\n<\/div>\n<div><strong>IKE Phase 2<\/strong><\/div>\n<div><\/div>\n<div>\n<div class=\"xml parbase xml_body_30\">\n<div class=\"body\">After the tunnel is secured and authenticated, in phase 2 the channel is further secured for the transfer of data between the networks. IKE phase 2 uses the keys that were established in Phase 1 of the process and the IPSec Crypto profile, which defines the IPSec protocols and keys used for the SA in IKE Phase 2.<\/div>\n<div class=\"body\"><span style=\"font-size: 1rem;\">&#8211; The IPSEC uses the following protocols to enable secure communication:<\/span><\/div>\n<div class=\"body\"><span style=\"font-size: 1rem;\">&#8211; Encapsulating Security Payload (ESP)\u2014Allows you to encrypt the entire IP packet, and authenticate the source and verify integrity of the data. While ESP requires that you encrypt and authenticate the packet, you can choose to only encrypt or only authenticate by setting the encryption option to Null; using encryption without authentication is discouraged.<\/span><\/div>\n<div class=\"body\"><span style=\"font-size: 1rem;\">&#8211; Authentication Header (AH)\u2014Authenticates the source of the packet and verifies data integrity. AH does not encrypt the data payload and is unsuited for deployments where data privacy is important. AH is commonly used when the main concern is to verify the legitimacy of the peer, and data privacy is not required.<\/span><\/div>\n<\/div>\n<\/div>\n<div><\/div>\n<div><strong>High Level Lab topology :<\/strong><\/div>\n<div><\/div>\n<div>\n<p id=\"OjBvPiP\"><img loading=\"lazy\" decoding=\"async\" width=\"795\" height=\"695\" class=\"alignnone size-full wp-image-473 \" src=\"http:\/\/www.balajibandi.com\/wp-content\/uploads\/2017\/08\/img_59a14f0fdbca2.png\" alt=\"\" srcset=\"https:\/\/www.balajibandi.com\/wp-content\/uploads\/2017\/08\/img_59a14f0fdbca2.png 795w, https:\/\/www.balajibandi.com\/wp-content\/uploads\/2017\/08\/img_59a14f0fdbca2-300x262.png 300w, https:\/\/www.balajibandi.com\/wp-content\/uploads\/2017\/08\/img_59a14f0fdbca2-768x671.png 768w\" sizes=\"auto, (max-width: 795px) 100vw, 795px\" \/><\/p>\n<\/div>\n<div><\/div>\n<div>\u00a0For High Availability for the ASA config, you can find my other post<\/div>\n<div><\/div>\n<div>\u00a0<strong>http:\/\/www.balajibandi.com\/2015\/01\/12\/asa-activestandby-single-mode-setup\/<\/strong><\/div>\n<div><\/div>\n<div><span style=\"font-size: 1rem;\"><strong>L2L VPN config Steps :<\/strong><\/span><\/div>\n<div>\n<p>======================<\/p>\n<p>1. Configure Interfaces<br \/>\n2. Configure ISAKMP policy<br \/>\n3. Configure transform-set<br \/>\n4. Configure ACL<br \/>\n5. Configure Tunnel group<br \/>\n6. Configure crypto map and attach to interface<br \/>\n7. Enable isakmp on interface<\/p>\n<p><strong>sysopt connection permit-vpn<\/strong> &#8212; Allow VPN traffic to bypass interface ACL<\/p>\n<p><strong>ASA Config :<\/strong><br \/>\n============<\/p>\n<p>1. Configure Interfaces<\/p>\n<p>interface GigabitEthernet0\/0<br \/>\nnameif outside<br \/>\nsecurity-level 0<br \/>\nip address 192.168.1.249 255.255.255.0<br \/>\nno shutdown<br \/>\n!<br \/>\ninterface GigabitEthernet0\/1<br \/>\nnameif inside<br \/>\nsecurity-level 100<br \/>\nip address 100.100.100.1 255.255.255.0<br \/>\nno shutdown<\/p>\n<p>2. Configure ISAKMP policy<\/p>\n<p>crypto ikev1 policy 10<br \/>\nauthentication pre-share<br \/>\nencryption aes-256<br \/>\nhash sha<br \/>\ngroup 5<br \/>\nlifetime 86400<\/p>\n<p>3. Configure transform-set<\/p>\n<p>crypto ipsec ikev1 transform-set ESP-AES256-SHA esp-aes-256 esp-sha-hmac<br \/>\ncrypto ipsec df-bit clear-df outside<\/p>\n<p>4. Configure ACL<\/p>\n<p>access-list VPN_SITE extended permit ip 30.30.30.0 255.255.255.0 20.20.20.0 255.255.255.0<\/p>\n<p>5. Configure Tunnel group<\/p>\n<p>tunnel-group 10.10.10.1 type ipsec-l2l<br \/>\ntunnel-group 10.10.10.1 ipsec-attributes<br \/>\nikev1 pre-shared-key cisco123<\/p>\n<p>6. Configure crypto map and attach to interface<\/p>\n<p>crypto map VPNMAP 10 match address VPN_SITE<br \/>\ncrypto map VPNMAP 10 set ikev1 transform-set ESP-AES256-SHA<br \/>\ncrypto map VPNMAP 10 set peer 10.10.10.1<br \/>\ncrypto map VPNMAP 10 set reverse-route<br \/>\ncrypto map VPNMAP 10 set lifetime seconds 28800<br \/>\ncrypto map VPNMAP 10 set pfs group5<br \/>\ncrypto map VPNMAP interface outside<\/p>\n<p>7. Enable isakmp on interface<\/p>\n<p>crypto ikev1 enable outside<\/p>\n<\/div>\n<p>&nbsp;<\/p>\n<p>===============<\/p>\n<p><strong>Router IOS config :<\/strong><br \/>\n===================<\/p>\n<p>1. Configure Interfaces<\/p>\n<p>interface GigabitEthernet0\/0<br \/>\nip address 20.20.20.2 255.255.255.0<br \/>\nduplex full<br \/>\nspeed auto<br \/>\nmedia-type rj45<br \/>\nno shut<br \/>\n!<br \/>\ninterface GigabitEthernet0\/1<br \/>\nip address 20.20.30.1 255.255.255.0<br \/>\nduplex auto<br \/>\nspeed auto<br \/>\nmedia-type rj45<br \/>\nno shut<\/p>\n<p>2. Configure ISAKMP policy<\/p>\n<p>crypto isakmp policy 10<br \/>\nauthentication pre-share<br \/>\nencryption aes 256<br \/>\nhash sha<br \/>\ngroup 5<br \/>\nlifetime 86400<\/p>\n<p>3. Configure transform-set<\/p>\n<p>crypto ipsec transform-set ESP-AES256-SHA esp-aes 256 esp-sha-hmac<br \/>\ncrypto ipsec df-bit clear<\/p>\n<p>4. Configure ACL<\/p>\n<p>ip access-list extended VPN_HQ<br \/>\npermit ip 20.20.20.0 0.0.0.255 30.30.30.0 0.0.0.255<\/p>\n<p>5. Configure Tunnel group<\/p>\n<p>crypto isakmp key cisco123 address 10.10.10.2 no-xauth<br \/>\ncrypto isakmp keepalive 10 3<\/p>\n<p>6. Configure crypto map<\/p>\n<p>crypto map VPNMAP 10 ipsec-isakmp<br \/>\nmatch address VPN_HQ<br \/>\nreverse-route<br \/>\nqos pre-classify<br \/>\nset peer 10.10.10.2<br \/>\nset security-association lifetime seconds 28800<br \/>\nset transform-set ESP-AES256-SHA<br \/>\nset pfs group5<\/p>\n<p>&nbsp;<\/p>\n<p>7. Enable isakmp on interface<\/p>\n<p>interface g0\/0<br \/>\ncrypto map VPNMAP<\/p>\n<p>&nbsp;<\/p>\n<p>If all Good, you see the below Verification :<\/p>\n<p>BRA2#show crypto isakmp sa<br \/>\nIPv4 Crypto ISAKMP SA<br \/>\ndst src state conn-id status<\/p>\n<p>IPv6 Crypto ISAKMP SA<\/p>\n<p>BRA2#<br \/>\nBRA2#<br \/>\nBRA2#show crypto isakmp sa<br \/>\nIPv4 Crypto ISAKMP SA<br \/>\n<strong>dst src state conn-id status<\/strong><br \/>\n<strong>20.20.20.2 192.168.1.249 QM_IDLE 1001 ACTIVE<\/strong><\/p>\n<p>IPv6 Crypto ISAKMP SA<\/p>\n<p>BRA2#show crypto ipse<br \/>\nBRA2#show crypto ipsec sa<br \/>\nBRA2#show crypto ipsec sa<\/p>\n<p>interface: GigabitEthernet0\/0<br \/>\nCrypto map tag: VPNMAP, local addr 20.20.20.2<\/p>\n<p>protected vrf: (none)<br \/>\nlocal ident (addr\/mask\/prot\/port): (20.20.30.0\/255.255.255.0\/0\/0)<br \/>\nremote ident (addr\/mask\/prot\/port): (100.100.100.0\/255.255.255.0\/0\/0)<br \/>\ncurrent_peer 192.168.1.249 port 500<br \/>\nPERMIT, flags={origin_is_acl,}<br \/>\n<strong>#pkts encaps: 30, #pkts encrypt: 30, #pkts digest: 30<\/strong><br \/>\n<strong> #pkts decaps: 30, #pkts decrypt: 30, #pkts verify: 30<\/strong><br \/>\n#pkts compressed: 0, #pkts decompressed: 0<br \/>\n#pkts not compressed: 0, #pkts compr. failed: 0<br \/>\n#pkts not decompressed: 0, #pkts decompress failed: 0<br \/>\n#send errors 0, #recv errors 0<\/p>\n<p>local crypto endpt.: 20.20.20.2, remote crypto endpt.: 192.168.1.249<br \/>\nplaintext mtu 1438, path mtu 1500, ip mtu 1500, ip mtu idb GigabitEthernet0\/0<br \/>\ncurrent outbound spi: 0x35693C5C(896089180)<br \/>\nPFS (Y\/N): Y, DH group: group5<\/p>\n<p>inbound esp sas:<br \/>\nspi: 0x87CA1271(2278167153)<br \/>\ntransform: esp-256-aes esp-sha-hmac ,<br \/>\nin use settings ={Tunnel, }<br \/>\nconn id: 1, flow_id: SW:1, sibling_flags 80000040, crypto map: VPNMAP<br \/>\nsa timing: remaining key lifetime (k\/sec): (4358631\/3579)<br \/>\nIV size: 16 bytes<br \/>\nreplay detection support: Y<br \/>\nStatus: ACTIVE(ACTIVE)<\/p>\n<p>inbound ah sas:<\/p>\n<p>inbound pcp sas:<\/p>\n<p>outbound esp sas:<br \/>\nspi: 0x35693C5C(896089180)<br \/>\ntransform: esp-256-aes esp-sha-hmac ,<br \/>\nin use settings ={Tunnel, }<br \/>\nconn id: 2, flow_id: SW:2, sibling_flags 80000040, crypto map: VPNMAP<br \/>\nsa timing: remaining key lifetime (k\/sec): (4358631\/3579)<br \/>\nIV size: 16 bytes<br \/>\nreplay detection support: Y<br \/>\nStatus: ACTIVE(ACTIVE)<\/p>\n<p>outbound ah sas:<\/p>\n<p>outbound pcp sas:<\/p>\n<p>&nbsp;<\/p>\n<p><strong>ASA Side Verification :<\/strong><\/p>\n<p>ASAV1# show crypto isakmp sa<\/p>\n<p>IKEv1 SAs:<\/p>\n<p>Active SA: 1<br \/>\nRekey SA: 0 (A tunnel will report 1 Active and 1 Rekey SA during rekey)<br \/>\nTotal IKE SA: 1<\/p>\n<p><strong>1 IKE Peer: 20.20.20.2<\/strong><br \/>\nType : L2L Role : initiator<br \/>\nRekey : no State : MM_ACTIVE<\/p>\n<p>There are no IKEv2 SAs<\/p>\n<p>ASAV1# show crypto ipsec sa<br \/>\ninterface: outside<br \/>\nCrypto map tag: VPNMAP, seq num: 10, local addr: 192.168.1.249<\/p>\n<p>access-list VPN_SITE extended permit ip 100.100.100.0 255.255.255.0 20.20.30.0 255.255.255.0<br \/>\nlocal ident (addr\/mask\/prot\/port): (100.100.100.0\/255.255.255.0\/0\/0)<br \/>\nremote ident (addr\/mask\/prot\/port): (20.20.30.0\/255.255.255.0\/0\/0)<br \/>\ncurrent_peer: 20.20.20.2<\/p>\n<p>&nbsp;<\/p>\n<p><strong>#pkts encaps: 62, #pkts encrypt: 62, #pkts digest: 62<\/strong><br \/>\n<strong> #pkts decaps: 62, #pkts decrypt: 62, #pkts verify: 62<\/strong><br \/>\n#pkts compressed: 0, #pkts decompressed: 0<br \/>\n#pkts not compressed: 62, #pkts comp failed: 0, #pkts decomp failed: 0<br \/>\n#pre-frag successes: 0, #pre-frag failures: 0, #fragments created: 0<br \/>\n#PMTUs sent: 0, #PMTUs rcvd: 0, #decapsulated frgs needing reassembly: 0<br \/>\n#TFC rcvd: 0, #TFC sent: 0<br \/>\n#Valid ICMP Errors rcvd: 0, #Invalid ICMP Errors rcvd: 0<br \/>\n#send errors: 0, #recv errors: 0<\/p>\n<p>local crypto endpt.: 192.168.1.249\/0, remote crypto endpt.: 20.20.20.2\/0<br \/>\npath mtu 1500, ipsec overhead 74(44), media mtu 1500<br \/>\nPMTU time remaining (sec): 0, DF policy: clear-df<br \/>\nICMP error validation: disabled, TFC packets: disabled<br \/>\ncurrent outbound spi: 87CA1271<br \/>\ncurrent inbound spi : 35693C5C<\/p>\n<p>inbound esp sas:<br \/>\nspi: 0x35693C5C (896089180)<br \/>\ntransform: esp-aes-256 esp-sha-hmac no compression<br \/>\nin use settings ={L2L, Tunnel, PFS Group 5, IKEv1, }<br \/>\nslot: 0, conn_id: 4096, crypto-map: VPNMAP<br \/>\nsa timing: remaining key lifetime (kB\/sec): (4373996\/3562)<br \/>\nIV size: 16 bytes<br \/>\nreplay detection support: Y<br \/>\nAnti replay bitmap:<br \/>\n0xFFFFFFFF 0xFFFFFFFF<br \/>\noutbound esp sas:<br \/>\nspi: 0x87CA1271 (2278167153)<br \/>\ntransform: esp-aes-256 esp-sha-hmac no compression<br \/>\nin use settings ={L2L, Tunnel, PFS Group 5, IKEv1, }<br \/>\nslot: 0, conn_id: 4096, crypto-map: VPNMAP<br \/>\nsa timing: remaining key lifetime (kB\/sec): (4373996\/3562)<br \/>\nIV size: 16 bytes<br \/>\nreplay detection support: Y<br \/>\nAnti replay bitmap:<br \/>\n0x00000000 0x00000001<\/p>\n<div><\/div>\n<div>\n<p>\u00a0IOS router side connected Windows PC :<\/p>\n<p id=\"ZjzlFFq\"><img loading=\"lazy\" decoding=\"async\" width=\"569\" height=\"120\" class=\"alignnone size-full wp-image-480 \" src=\"http:\/\/www.balajibandi.com\/wp-content\/uploads\/2017\/08\/img_59a46393f2101.png\" alt=\"\" srcset=\"https:\/\/www.balajibandi.com\/wp-content\/uploads\/2017\/08\/img_59a46393f2101.png 569w, https:\/\/www.balajibandi.com\/wp-content\/uploads\/2017\/08\/img_59a46393f2101-300x63.png 300w\" sizes=\"auto, (max-width: 569px) 100vw, 569px\" \/><\/p>\n<p>Pinging to other side Windows box.<\/p>\n<\/div>\n<div><\/div>\n<div>\n<p id=\"wRVJsSH\"><img loading=\"lazy\" decoding=\"async\" width=\"553\" height=\"159\" class=\"alignnone size-full wp-image-481 \" src=\"http:\/\/www.balajibandi.com\/wp-content\/uploads\/2017\/08\/img_59a463ca7fb22.png\" alt=\"\" srcset=\"https:\/\/www.balajibandi.com\/wp-content\/uploads\/2017\/08\/img_59a463ca7fb22.png 553w, https:\/\/www.balajibandi.com\/wp-content\/uploads\/2017\/08\/img_59a463ca7fb22-300x86.png 300w\" sizes=\"auto, (max-width: 553px) 100vw, 553px\" \/><\/p>\n<\/div>\n<div>\u00a0ASA connected Windows Testing :<\/div>\n<div><\/div>\n<div>\n<p id=\"KpjmZDR\"><img loading=\"lazy\" decoding=\"async\" width=\"370\" height=\"73\" class=\"alignnone size-full wp-image-482 \" src=\"http:\/\/www.balajibandi.com\/wp-content\/uploads\/2017\/08\/img_59a464048b536.png\" alt=\"\" srcset=\"https:\/\/www.balajibandi.com\/wp-content\/uploads\/2017\/08\/img_59a464048b536.png 370w, https:\/\/www.balajibandi.com\/wp-content\/uploads\/2017\/08\/img_59a464048b536-300x59.png 300w\" sizes=\"auto, (max-width: 370px) 100vw, 370px\" \/><\/p>\n<p>Pinging to other side Windows box.<\/p>\n<p id=\"DnKRNdO\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-483 \" src=\"http:\/\/www.balajibandi.com\/wp-content\/uploads\/2017\/08\/img_59a46422ab87c.png\" alt=\"\" width=\"463\" height=\"155\" srcset=\"https:\/\/www.balajibandi.com\/wp-content\/uploads\/2017\/08\/img_59a46422ab87c.png 405w, https:\/\/www.balajibandi.com\/wp-content\/uploads\/2017\/08\/img_59a46422ab87c-300x101.png 300w\" sizes=\"auto, (max-width: 463px) 100vw, 463px\" \/><\/p>\n<\/div>\n<div><\/div>\n<div>\n<p><strong>DEBUGING :<\/strong><br \/>\n========<\/p>\n<p>debug crypto engine 127<br \/>\ndebug crypto isakmp 127<br \/>\ndebug crypto ipsesc 127<\/p>\n<p>&nbsp;<\/p>\n<p>Phase 1 :<br \/>\nshow isa sa<\/p>\n<p>Phase 2:<br \/>\nshow cry ipsec sa<\/p>\n<p><strong>CLEAR THE CONFIG IPSEC:<\/strong><br \/>\n======================<\/p>\n<p>clear config crypto<br \/>\nclear config group-policy<br \/>\nclear config tunnel-group<\/p>\n<p><strong>CLEAR THE CONFIG SSL:<\/strong><br \/>\n======================<br \/>\nclear config webvpn<br \/>\nclear config group-policy<br \/>\nclear config tunnel-group<\/p>\n<\/div>\n<div><\/div>\n<div><strong>\u00a0Hope you enjoyed the article, Happy Labbing &#8211; BB<\/strong><\/div>\n<div><\/div>\n","protected":false},"excerpt":{"rendered":"<p>My way of journey learning Cisco Security : This article show you how to establish VPN between Cisco ASA and Cisco IOS router. Some basics about VPN \u00a0before i proceed to the config : IKE Phase 1 In this phase, the firewalls use the parameters defined in the IKE Gateway configuration and the IKE Crypto [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[11,2,6],"tags":[],"class_list":["post-469","post","type-post","status-publish","format-standard","hentry","category-ccie-sec","category-cisco","category-security"],"_links":{"self":[{"href":"https:\/\/www.balajibandi.com\/index.php?rest_route=\/wp\/v2\/posts\/469","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.balajibandi.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.balajibandi.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.balajibandi.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.balajibandi.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=469"}],"version-history":[{"count":11,"href":"https:\/\/www.balajibandi.com\/index.php?rest_route=\/wp\/v2\/posts\/469\/revisions"}],"predecessor-version":[{"id":485,"href":"https:\/\/www.balajibandi.com\/index.php?rest_route=\/wp\/v2\/posts\/469\/revisions\/485"}],"wp:attachment":[{"href":"https:\/\/www.balajibandi.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=469"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.balajibandi.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=469"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.balajibandi.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=469"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}