How do I route all traffic to a SonicWall NSv using a different address space (different VNet)?
03/26/2020 12 7435
IP Addresses used in this article
Create a virtual machine which is using a different address space (different resource group) and different subnet (10.0.4.4/24) and SonicWall NSv X0 interface of SonicWall 10.5.1.4/24 and X1 interface of SonicWall 10.5.0.4/24.
Create a VNet peering between both the virtual network (SonicWall NSv) and (MACHINE_TEST_DIFF_VNET) under Virtual networks >AzureNSvSonicWall.
Note: Please allow traffic from AzureNSvSonicWalltoMACHINE_TEST_DIFF_VNET to MACHINE_TEST_DIFF_VNETtoAzureNSvSonicWall and vice-versa.
Create a route table under Home > Route table > Create route table.
Add a route which will send any traffic to the next hop as 10.5.1.4 under Home > Route tables > MACHINE_TEST_DIFF_VNET_ROUTE_ALL.
Associate the subnet to the route table by selecting the virtual network that the NSv is a part of and subnet as 10.0.4.0/24.
NOTE: After configuring please create a route in the SonicWall to reach 10.0.4.0/24 subnet via X0 of SonicWall with gateway as 10.5.1.1.
The local virtual machine will not be accessed through the public IP so a NAT and access rule are required to access the virtual machine via WAN to LAN.