Search code examples
azureroutesvnet

How to analyse traffic from another VM in Azure using UDR


Scenario

In Azure, I have the following configuration:

1 VNET (address space) - 10.10.0.0/24

  • Subnet 1 - 10.10.0.0/28

  • Subnet 2 - 10.10.0.16/28

  • VM 1 (in subnet 1) - has IP@ of 10.10.0.1

  • VM 2 (in subnet 2) - has IP@ of 10.10.0.17

Problem

I need to create a UDR (a custom route) that allows VM1 to receive all packets from VM2.

What would that route be?

I cannot seem to find any links on the internet explaining this scenario.


Solution

  • I have tested in my environment.

    By default, the VM1 in subnet1 is allowed to receive all data packets from VM2 in subnet2 if both subnet1 and subnet2 are in the same Virtual Network. We do not need to create any custom route (User Defined Route) for this

    For this to work, the firewall for the private networks needs to be turned off inside both the VMs. Then both the VMs will be able to receive data packets from each other

    I created VM1 (10.0.0.4) in subnet1 (10.0.0.0/24) and VM2 (10.0.1.4) in subnet2 (10.0.1.0/24)

    I turned the firewall off for private networks in both the VMs VM1 and VM2

    I can receive data packets from each other

    I pinged VM2 private IP address from VM1 and able to receive the data packets from VM2

    enter image description here