Connecting vnet to vnet in Azure.
for a note to self:
- Create two vnet resource group call it vnet01 and vnet02. Vnet
- On vnet01 create a new virtual network, device the IP range as 10.1.0.0/16
- Create a default subnet in it mark it like 10.1.0.0/24
- Create a GatewaySubnet and mark it 10.1.2.0/29 it can only reside between /16 and /29. It is important to keep in mind that the IP ranges of default subnet and GatewaySubnet must not be overlapping.
- Create a public IP resource in vnet01.
- Create a Virtual network gateway in vnet01, point it to the public IP resource you created in step 5.
- Do the same process for vnet02.
- Create a virtual network and give it an IP 192.168.0.0/16 and give default subnet an IP of 192.168.1.0/24 and GatewaySubnet 192.168.2.0/29
- create a public IP resource.
- create a virtual network gateway.
- we now need to create the connection, search in marketplace "Connection" Make sure it is set to vnet to vnet, in the PSK- called as ore shared key type the key that will be shared by the machine click on create and make sure you have checked bidirectional connectivity checkbox on.