{"id":922,"date":"2010-05-15T09:48:12","date_gmt":"2010-05-15T08:48:12","guid":{"rendered":"http:\/\/mccltd.net\/blog\/?p=922"},"modified":"2010-05-15T09:48:12","modified_gmt":"2010-05-15T08:48:12","slug":"configuring-ipsec-tunnel-between-two-lans-using-the-same-subnet","status":"publish","type":"post","link":"http:\/\/darenmatthews.com\/blog\/?p=922","title":{"rendered":"Configuring IPSec tunnel between two LANs using the same subnet"},"content":{"rendered":"<p>How to set up an IPSec tunnel between two LANs using the same subnet.<\/p>\n<p>Conflicting LAN IP subnets can cause difficulties when routing through a tunnel.\u00a0 This configuration uses NAT to overcome the problem of duplicate addresses:<!--more--><\/p>\n<p><a href=\"http:\/\/darenmatthews.com\/blog\/wp-content\/uploads\/2010\/05\/Configuring-IPSec-Tunnel-Between-Same-Subnets.JPG\"><img loading=\"lazy\" class=\"aligncenter size-full wp-image-923\" title=\"Configuring IPSec Tunnel Between Same Subnets\" src=\"http:\/\/darenmatthews.com\/blog\/wp-content\/uploads\/2010\/05\/Configuring-IPSec-Tunnel-Between-Same-Subnets.JPG\" alt=\"Configuring IPSec Tunnel Between Same Subnets\" width=\"892\" height=\"618\" srcset=\"http:\/\/darenmatthews.com\/blog\/wp-content\/uploads\/2010\/05\/Configuring-IPSec-Tunnel-Between-Same-Subnets.JPG 892w, http:\/\/darenmatthews.com\/blog\/wp-content\/uploads\/2010\/05\/Configuring-IPSec-Tunnel-Between-Same-Subnets-300x207.jpg 300w\" sizes=\"(max-width: 892px) 100vw, 892px\" \/><\/a><\/p>\n<p>CONFIGURATIONS:<\/p>\n<p><strong>Router A<\/strong><\/p>\n<blockquote><p>Current configuration : 1404 bytes<br \/>\n!<br \/>\nversion 12.3<br \/>\nservice timestamps debug datetime msec<br \/>\nservice timestamps log datetime msec<br \/>\nno service password-encryption<br \/>\n!<br \/>\nhostname SV3-2<br \/>\n!<br \/>\nboot-start-marker<br \/>\nboot-end-marker<br \/>\n!<br \/>\n!<br \/>\nno aaa new-model<br \/>\nip subnet-zero<br \/>\n!<br \/>\n!<br \/>\n!<br \/>\n!<br \/>\nip audit notify log<br \/>\nip audit po max-events 100<br \/>\nip ssh break-string<br \/>\nno ftp-server write-enable<br \/>\n!<br \/>\n!<\/p>\n<p>!&#8212; These are the Internet Key Exchange (IKE) parameters.<\/p>\n<p>crypto isakmp policy 10<br \/>\nencr 3des<br \/>\nhash md5<br \/>\nauthentication pre-share<br \/>\ncrypto isakmp key cisco123 address 10.5.76.57<br \/>\n!<\/p>\n<p>!&#8212; These are the IPSec parameters.<\/p>\n<p>crypto ipsec transform-set myset1 esp-3des esp-md5-hmac<br \/>\n!<br \/>\n!<br \/>\ncrypto map mymap 10 ipsec-isakmp<br \/>\nset peer 10.5.76.57<br \/>\nset transform-set myset1<\/p>\n<p>!&#8212; Encrypt traffic to the other side.<\/p>\n<p>match address 100<br \/>\n!<br \/>\n!<br \/>\n!<br \/>\ninterface Serial0\/0<br \/>\ndescription Interface to Internet<br \/>\nip address 10.5.76.58 255.255.0.0<br \/>\nip nat outside<br \/>\nclockrate 128000<br \/>\ncrypto map mymap<br \/>\n!<br \/>\ninterface Ethernet0\/0<br \/>\nip address 172.16.1.1 255.255.255.0<br \/>\nno ip directed-broadcast<br \/>\nip nat inside<br \/>\nhalf-duplex<br \/>\n!<br \/>\n!<\/p>\n<p>!&#8212; This is the NAT traffic.<\/p>\n<p>ip nat inside source static network 172.16.0.0 172.18.0.0 \/16 no-alias<br \/>\nip http server<br \/>\nno ip http secure-server<br \/>\nip classless<br \/>\nip route 0.0.0.0 0.0.0.0 Serial0\/0<br \/>\n!<\/p>\n<p>!&#8212; Encrypt traffic to the other side.<\/p>\n<p>access-list 100 permit ip 172.18.0.0 0.0.255.255 172.19.0.0 0.0.255.255<br \/>\n!<br \/>\ncontrol-plane<br \/>\n!<br \/>\n!<br \/>\nline con 0<br \/>\nline aux 0<br \/>\nline vty 0 4<br \/>\n!<br \/>\n!<br \/>\nend<\/p><\/blockquote>\n<p><strong>Router B<\/strong><\/p>\n<blockquote><p>Current configuration : 1255 bytes<br \/>\n!<br \/>\nversion 12.3<br \/>\nservice timestamps debug datetime msec<br \/>\nservice timestamps log datetime msec<br \/>\nno service password-encryption<br \/>\n!<br \/>\nhostname SV3-15<br \/>\n!<br \/>\nboot-start-marker<br \/>\nboot-end-marker<br \/>\n!<br \/>\n!<br \/>\nmemory-size iomem 15<br \/>\nno aaa new-model<br \/>\nip subnet-zero<br \/>\n!<br \/>\n!<br \/>\n!<br \/>\nip audit notify log<br \/>\nip audit po max-events 100<br \/>\n!<\/p>\n<p>!&#8212; These are the IKE parameters.<\/p>\n<p>crypto isakmp policy 10<br \/>\nencr 3des<br \/>\nhash md5<br \/>\nauthentication pre-share<br \/>\ncrypto isakmp key cisco123 address 10.5.76.58<br \/>\n!<\/p>\n<p>!&#8212; These are the IPSec parameters.<\/p>\n<p>crypto ipsec transform-set myset1 esp-3des esp-md5-hmac<br \/>\n!<br \/>\ncrypto map mymap 10 ipsec-isakmp<br \/>\nset peer 10.5.76.58<br \/>\nset transform-set myset1<\/p>\n<p>!&#8212; Encrypt traffic to the other side.<\/p>\n<p>match address 100<br \/>\n!<br \/>\n!<br \/>\ninterface FastEthernet0\/0<br \/>\nip address 172.16.1.1 255.255.255.0<br \/>\nip nat inside<br \/>\nduplex auto<br \/>\nspeed auto<br \/>\n!<br \/>\ninterface Serial0\/0<br \/>\ndescription Interface to Internet<br \/>\nip address 10.5.76.57 255.255.0.0<br \/>\nip nat outside<br \/>\ncrypto map mymap<br \/>\n!<\/p>\n<p>!&#8212; This is the NAT traffic.<\/p>\n<p>ip nat inside source static network 172.16.0.0 172.19.0.0 \/16 no-alias<br \/>\nip http server<br \/>\nno ip http secure-server<br \/>\nip classless<br \/>\nip route 0.0.0.0 0.0.0.0 Serial0\/0<br \/>\n!<\/p>\n<p>!&#8212; Encrypt traffic to the other side.<\/p>\n<p>access-list 100 permit ip 172.19.0.0 0.0.255.255 172.18.0.0 0.0.255.255<br \/>\n!<br \/>\n!<br \/>\nline con 0<br \/>\nline aux 0<br \/>\nline vty 0 4<br \/>\n!<br \/>\n!<br \/>\n!<br \/>\nend<\/p><\/blockquote>\n<blockquote><p><span> <\/span><\/p><\/blockquote>\n","protected":false},"excerpt":{"rendered":"<p>How to set up an IPSec tunnel between two LANs using the same subnet. Conflicting LAN IP subnets can cause difficulties when routing through a tunnel.\u00a0 This configuration uses NAT to overcome the problem of duplicate addresses:<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[83,27,13],"tags":[36,44],"_links":{"self":[{"href":"http:\/\/darenmatthews.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/922"}],"collection":[{"href":"http:\/\/darenmatthews.com\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/darenmatthews.com\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/darenmatthews.com\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/darenmatthews.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=922"}],"version-history":[{"count":2,"href":"http:\/\/darenmatthews.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/922\/revisions"}],"predecessor-version":[{"id":925,"href":"http:\/\/darenmatthews.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/922\/revisions\/925"}],"wp:attachment":[{"href":"http:\/\/darenmatthews.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=922"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/darenmatthews.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=922"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/darenmatthews.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=922"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}