Routing between two subnets

Tomasich, Andrea 26 Reputation points
2020-06-22T13:57:50.167+00:00

Hi, I've created two subnets on the same virtual network.
I've defined a default route to a Azure firewall in this vnet.
I can reach two sample hosts (one on each subnet) with RDP from internet, passing through the firewall.
But If I try to produce traffic from a host to the other and vice versa, this traffic doesn't go to firewall.
How to solve?

Azure Virtual Machines
Azure Virtual Machines
An Azure service that is used to provision Windows and Linux virtual machines.
7,370 questions
{count} vote

Accepted answer
  1. Andreas Baumgarten 99,376 Reputation points MVP
    2020-06-22T18:02:57.857+00:00

    "Hub&Spoke" is the name of a network topology, nothing "Azure-Special":

    Hub-spoke network topology in Azure

    Regards

    Andreas Baumgarten

    (Please don't forget to Accept as answer if the reply is helpful)

    3 people found this answer helpful.

9 additional answers

Sort by: Most helpful
  1. Moamen Hany 1,091 Reputation points MVP
    2020-08-07T22:28:17.473+00:00

    In the same vNET it's routed by default, but if you have two vNET's you have to configure Route table

    also check this article
    https://learn.microsoft.com/en-us/azure/architecture/reference-architectures/hybrid-networking/hub-spoke#deploy-the-solution

    (Please don't forget to Accept as answer if the reply is helpful)
    http://www.moamenhany.com

    2 people found this answer helpful.
    0 comments No comments

  2. Andreas Baumgarten 99,376 Reputation points MVP
    2020-06-22T14:34:05.057+00:00

    Maybe this is helpful:

    Virtual network traffic routing

    Though a virtual network contains subnets, and each subnet has a defined address range, Azure does not create default routes for subnet address ranges, because each subnet address range is within an address range of the address space of a virtual network.

    Regards

    Andreas Baumgarten

    (Please don't forget to Accept as answer if the reply is helpful)

    0 comments No comments

  3. Tomasich, Andrea 26 Reputation points
    2020-06-22T14:38:57.167+00:00

    Hi, thank your for reply but how can I "separate" the two subnets?
    I need that from a subnet I can reach the other and NOT vice versa...

    0 comments No comments

  4. Andreas Baumgarten 99,376 Reputation points MVP
    2020-06-22T14:44:41.243+00:00

    As two subnets in one virtual network are "routed by default" the only way I can think of is creating 2 virtual networks with one subnet in each virtual network.
    This way you should be able to work with routes.

    If you just want to block communication maybe a Network Security Group (NSG) is an option as well. But this is not routing based control of communication but is more simple allow/deny ruleset for communication.

    Regards

    Andreas Baumgarten

    (Please don't forget to Accept as answer if the reply is helpful)

    0 comments No comments