Why I need to create a rule for 443 for NSG to load balancer

Jan Vávra 251 Reputation points
2024-01-25T15:49:57.1133333+00:00

I have a standard scenario. A pool of VMs with a https web server and Azure Load Balancer in front of it. Each VM network interface is attached to a network security group (NSG).

Why is it necessary to add rule ‘100’ to allow a TCP health probe to connect to a Load Balancer? to the VM. Without it, the Load Balancer is not accessible from the Internet.

obrazek

I thought that rule "65001" AllowAzureLoadBalancerInBound should be sufficient.

Azure Virtual Network
Azure Virtual Network
An Azure networking service that is used to provision private networks and optionally to connect to on-premises datacenters.
2,158 questions
Azure Load Balancer
Azure Load Balancer
An Azure service that delivers high availability and network performance to applications.
404 questions
0 comments No comments
{count} votes

Accepted answer
  1. ChaitanyaNaykodi-MSFT 23,031 Reputation points Microsoft Employee
    2024-01-26T05:01:22.3733333+00:00

    @Jan Vávra

    Thank you for reaching out.

    Your observation above actually coincides with how Azure Load balancer is designed to work. For Azure Load Balancer a response to an inbound flow is always a response from a virtual machine. When the flow arrives on the virtual machine, the original source IP address is also preserved. Every endpoint is answered by a VM. For example, a TCP handshake occurs between the client and the selected back-end VM. A response to a request to a front end is a response generated by a back-end VM. When you successfully validate connectivity to a front end, you're validating the connectivity throughout to at least one back-end virtual machine. This is currently documented here.

    As client IP is preserved the NSG associated with the VM's nic should allow the communication for any Public IP addresses.

    If this is not a desired outcome, you can consider using Azure Application Gateway in your scenario.

    Hope this helps! Please let me know if you have any additional questions. Thank you!

    ---Please "Accept the answer" if the information helped you. This will help us and others in the community as well.

    1 person found this answer helpful.
    0 comments No comments

0 additional answers

Sort by: Most helpful