Installation of a linux router on azure

eishi 61 Reputation points
2023-10-23T00:30:32.19+00:00

I would like to install a linux router in azure vnet/subnet for routing, but I don't know how to do it.

I would like to create a linux router between two subnets and have both servers on the two subnets communicate through the linux router.

Is it possible to set up my own linux router in azure?

Azure Virtual Machines
Azure Virtual Machines
An Azure service that is used to provision Windows and Linux virtual machines.
9,018 questions
0 comments No comments
{count} votes

Accepted answer
  1. msrini-MSFT 9,291 Reputation points Microsoft Employee
    2023-10-23T21:31:17.5+00:00

    Hi,

    By default 2 subnets in the same VNET can connect to each other. If your intension is to force the traffic between 2 subnets via an NVA, you can do that by adding a UDR and forcing the other subnet traffic to go via NVA.

    Here is a lab which I have found in GitHub where you can use the steps to create an NVA in Azure: https://github.com/erjosito/azure-networking-lab#lab2

    Regards,

    Karthik Srinivas

    1 person found this answer helpful.

1 additional answer

Sort by: Most helpful
  1. Luis Arias 8,621 Reputation points Volunteer Moderator
    2023-10-23T19:50:47.7866667+00:00

    HI @eishi,

    If you are trying to filter your traffice by this specific VM that you can do are:

    • Create the virtuall network
    • Create the subnets required
    • Create and configure this VM with access to public network (Your private configuration on linux)
    • Add an UDR and attach to 2 subnets where is your VMs

    User's image

    • Add a route within the UDR and setup next hope to your custom linux VM

    User's image

    Some Additional information about routing:

    https://learn.microsoft.com/en-us/azure/virtual-network/virtual-networks-udr-overview

    Cheers,

    Luis Arias


    If the information helped address your question, please Accept the answer.

    1 person found this answer helpful.

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.