Skip to main content

OVERLAPPING SUBNET IPSEC VPN

    This blog provides a networking example that simulates two different companies with the same IP addressing scheme. Two routers are connected with a VPN tunnel, and the networks behind each router are the same. For one site to access hosts at the other site, Network Address Translation (NAT) with route map is used on the routers to change both the source and the destination addresses to different subnets.



TEST RTR CONFIGURATION

IKE PHASE I 

crypto isakmp policy 10

 encr 3des

 hash md5

 authentication pre-share

 group 5

crypto isakmp key cisco123 address 202.45.144.123


 IKE PHASE II 

crypto ipsec transform-set set-test esp-des esp-sha-hmac

crypto map mymap 10 ipsec-isakmp

 set peer 202.45.144.123

 set transform-set set-test

 match address IPSEC-VPN

 reverse-route static

 NAT CONFIG 

ip nat inside source static network 10.112.112.0 172.16.2.0 /24

Note : As our subnet is same in both the end NAT must be performed otherwise not required.

 ACCESS-LIST 

ip access-list extended IPSEC-VPN

 permit ip 172.16.2.0 0.0.0.255 172.16.1.0 0.0.0.255

MOF RTR CONFIGURATION

IKE PHASE I 

crypto isakmp policy 81

 encr 3des

 hash md5

 authentication pre-share

 group 5

crypto isakmp key cisco123 address 202.166.195.212


IKE PHASE II 

crypto ipsec transform-set set-mof esp-des esp-sha-hmac

crypto map mymap 81 ipsec-isakmp

 set peer 202.166.195.212

 set transform-set set-mof

 match address VPN-MAX

 reverse-route static

ACCESS-LIST 

Extended IP access list VPN-MAX

 10 permit ip 172.16.1.0 0.0.0.255 host 172.16.2.10

NAT 

ip nat inside source static 10.112.112.16 172.16.1.16

NOTE : NAT IS BEING USED AS LOCAL SUBNET ON BOTH THE END IS SAME.

One to One Nat is being currently performed in both the sides for the address to be translated which could bring out issues if we are pairing up with other remote sites as well as in the case of using internet for that particular machine. So, in order to overcome the issue we must be using route map and define a new set of ACL to be called up in the route map

ACCESS-LIST FOR ROUTE MAP
Extended IP access list VPN-SCB-TEST
    10 permit ip 10.112.112.0 0.0.0.255 host 172.16.2.10

172.16.2.10 is the remote NAT'd IP which will be the source IP if the traffic is initiated from the TEST RTR side

ROUTE MAP 
route-map RM-STATIC-NAT permit 10
 match ip address VPN-SCB-TEST


NAT with Route MAP
 
ip nat inside source static 10.112.112.16 172.16.1.16 route-map RM-STATIC-NAT

I have only demonstrated NAT with route map example in one of the sites but route map needs to be placed on both the sides. 

Comments

Popular posts from this blog

SSL Decryption FortiGate

  We have pretty much heard about SSL decryption and of malware hiding inside an encrypted traffic. A large amount of traffic in the internet is pretty much encrypted which basically means that bad things like malware, virus, ransomware can hide inside this encrypted traffic. If majority of these traffic are encrypted our Firewalls are not able to analyze these traffic which can easily infect our organization and the investment which we have done in these firewalls are wasted. There does come around a solution for this and as my topic suggest SSL Decryption also know as Deep Packet Inspection as by some IT folks. The image that I have attached down below clearly suggest about what I am trying to explain. Using deep packet inspection, the firewall simply decrypts the encrypted traffic happening  between client and server, inspects the content to find the threats and block them , then forwards it to the destination re-encrypting it . We will need to first setup the SSL/SSH in...

High Availability Palo Alto (Active/Standby)

 High Availability is usually performed in most of the data centers networks today which ensures application availability . High Availability is usually achieved in case one of the appliance goes down or have some physical or logical connectivity issues.  Achieving high availability in Palo Alto firewall is relatively very easy. Palo Alto firewall can work in both Active/Standby mode or in Active/Active. We will basically be talking about Active/Standby mode in this article. There are basically two links that needs to be configure in Palo Alto for HA. 1. Control Links Control Links are associated with control plane traffic which is mainly used for heartbeat exchanged, configuration synchronization. Dedicate HA ports are available in higher series of Palo Alto or even a HA interface can be created for some inband ports.   2. Data Links Data Links are mainly used for session synchronization, forwarding table synchronization. Dedicated HSCI Ports are available for highe...

Virtual Chassis Juniper EX 3400 (PREPROVISONED)

Juniper has always been an technology that I have always liked right from the beginning of my career when I was working as an Jr Network Administrator. The logical command as well as the hierarchy based Juniper devices has always made me love the device. Let me today talk about a very useful and an interesting topic which we usually called stack in the world of Cisco and virtual chassis in the world of Juniper, both of them mean the same thing logically make two or more than two switch as a one and configure and manage the device as a single unity. High Availability, managed configuration and maintenance are few of the benefits that a virtual chassis can provide. The configuration for virtual chassis can be found easily in the juniper sites but my objective about writing this is making it more simpler in context to Juniper's document. There are basically two ways of configuring virtual chassis in Juniper. 1.   Nonprovisioned configuration  :  The master switch assig...