Securing Network Environment | Routing Network Traffic | Exam AZ-500 | Microsoft Azure

Configure Routing for Network Traffic

Question

You are configuring and securing a network environment.

You deploy an Azure virtual machine named VM1 that is configured to analyze network traffic.

You need to ensure that all network traffic is routed through VM1.

What should you configure?

Answers

Explanations

Click on the arrows to vote for the correct answer

A. B. C.

C

Although the use of system routes facilitates traffic automatically for your deployment, there are cases in which you want to control the routing of packets through a virtual appliance. You can do so by creating user defined routes that specify the next hop for packets flowing to a specific subnet to go to your virtual appliance instead, and enabling IP forwarding for the VM running as the virtual appliance.

Note: User Defined Routes -

For most environments you will only need the system routes already defined by Azure. However, you may need to create a route table and add one or more routes in specific cases, such as:

-> Force tunneling to the Internet via your on-premises network.

-> Use of virtual appliances in your Azure environment.

-> In the scenarios above, you will have to create a route table and add user defined routes to it.

https://github.com/uglide/azure-content/blob/master/articles/virtual-network/virtual-networks-udr-overview.md

To ensure that all network traffic is routed through VM1 in Azure, you need to configure a user-defined route.

A system route is a default route that is automatically created by Azure for each virtual network, and it directs traffic to the Internet or on-premises networks. However, it cannot be used to route traffic through a specific virtual machine.

A network security group (NSG) is used to control network traffic to and from Azure resources. It allows or denies traffic based on source and destination IP addresses, ports, and protocols. However, it does not route traffic through a specific virtual machine.

A user-defined route is a custom route that you can configure to direct traffic to a specific virtual machine or a next hop. In this case, you can create a user-defined route that directs all network traffic to VM1.

To configure a user-defined route to route all traffic through VM1, you can follow these steps:

  1. In the Azure portal, go to the virtual network where VM1 is located.
  2. Click on the "Subnets" tab, select the subnet where VM1 is located, and click on "Route table".
  3. Click on "Add" to create a new route table.
  4. In the "Name" field, enter a name for the route table.
  5. In the "Next hop type" field, select "Virtual appliance".
  6. In the "Virtual appliance IP address" field, enter the private IP address of VM1.
  7. In the "Address prefix" field, enter "0.0.0.0/0" to match all traffic.
  8. Click on "OK" to create the user-defined route.
  9. Associate the new route table with the subnet where VM1 is located.

Once the user-defined route is configured, all network traffic will be routed through VM1.