Connecting VNets using a VPN gateway connection
The second option for connecting two VNets is to use a VPN gateway connection. This option uses Azure VPN Gateway to provide a secure IPsec/IKE tunnel to the target VNet. It is not as easy to implement, as it requires a VPN gateway with a public IP to be deployed in the VNets (Figure 4.8). Deploying the gateway could take around 40 minutes.
Also, unlike VNet peering, the traffic is routed over the public internet and not privately via the Microsoft backbone:
Figure 4.8 – Traffic is routed over the public internet
So why would we use this option if it is more complex to implement and if it is routed over the public internet? The main advantage of this option is that the traffic flow between the VNets is encrypted using IKE, and this may be a security or compliance requirement for specific use cases that we have.
When implementing the VPN gateway to connect two VNets, there are two connection types...