Configuring NAT And PAT For Azure Load Balancer

Azure load balancers are a highly available single point of contact for traffic distribution to hosts in a backend pool. They can be used with health probes to ensure layer 4 traffic (TCP/UDP) is consistently and evenly distributed to healthy Virtual Machines.

In this article, we will learn how to create an Azure load balancer, configure Network Address Translation (NAT) and Port Address Translation (PAT) rules for RDP traffic for support or monitoring, and then lock it down with a network security group. This is easily adaptable to many other types of traffic.

Prerequisites

  • Load Balancer
  • Virtual Machines

Step 1

Deploy the Load Balancer; click here to learn how to deploy the Azure Load balancer.

Configuring NAT and PAT for Azure Load balancer

Step 2

In the Virtual Machine, click the Networking under Settings and click Load balancing.

Configuring NAT and PAT for Azure Load balancer

Step 3

Click Add Load balancing, select the Load balancing options as Azure load balancer, and select the load balancer. If you have already created the Backend pool in the Load balancer, you can use an existing one. Otherwise, we can select Create new, enter the Backend pool name, and click Save.

Repeat the same configuration for another Virtual machine; select the existing in the Backend pool option because we have already created the Backend pool.

Configuring NAT and PAT for Azure Load balancer

Step 4

To verify the Backend pool information, go to the Load balancer and select the Backend pools under the settings.

Configuring NAT and PAT for Azure Load balancer

Step 5

Now, we need to create the NAT rule. Go to the Inbound NAT rules under the settings and click + Add.

Configuring NAT and PAT for Azure Load balancer

Step 6

In the Add inbound NAT rule section, enter the name for the rule, select the Type as Backed pool and select the Target backend pool, select the Frontend IP address, and enter the different port number for the Frontend port range start, enter the Maximum number of machines in backend pool, enter the correct backend port number and click Add.

Configuring NAT and PAT for Azure Load balancer

Step 7

Open the Remote Desktop Connection, enter the Virtual machine’s IP address with the New Port number, and hit connect.

Configuring NAT and PAT for Azure Load balancer

Step 8

The Port Address Translation (PAT) is a success.

Configuring NAT and PAT for Azure Load balancer

Summary

This article taught us how to configure a NAT and PAT for Azure Load balancer. If you have any questions, feel free to comment under this article.


Similar Articles
IFS R&D International (Private) Limited
IFS is a global enterprise software vendor providing solutions that help companies get better return