Azure Public Load Balancer cannot access to backend pool VMs - azure

I'm facing the Azure Public Load Balancer issue, cannot access the load balancer public IP use by port 80 but I can access to backend pool VM's port 80.
My Azure Public Load Balancer setting all following the Microsoft Azure Documentation.
The Backend Pool VMs also can access port 80 by VMs public IP.
There any troubleshoot for this situation?
Thanks.

If you are unable to connect to your VMs via the load balancer front end IP / port, it is usually an issue with your LB configuration, backend health, or a firewall / NSG blocking the connection.
Please refer the below troubleshooting docs to go through your configuration:
https://learn.microsoft.com/en-us/azure/load-balancer/load-balancer-troubleshoot-backend-traffic
Your LB configuration will be setup using the Load Balancing Rules of your load balancer.
Azure Load Balancer will not route traffic to backends that are not reporting healthy via the Health Probes, so make sure your backend is healthy.
A Firewall or NSG can also block the connection, so make sure there are no firewalls in your environment/OS firewalls that block the traffic, and check your Network Security Groups (NSGs) on your Subnet / NICs of the VM are not blocking the load balancing probes (AllowAzureLoadBalancerInBound rule).
You can also run the automated troubleshooter for specific issues on your load balancer from the "Diagnose and solve problems" tab of your load balancer resource in Azure portal as shown in the below picture:

Related

Azure load balancer inside a subnet VPN gateway

I have two virtual machines in azure VNet (IP adresses 10.1.0.4 and 10.1.0.5), and one machine connected to VNet via VPN Gateway (IP 10.3.0.2). Is is possible to create a load balancing in internal load balancer to redirect UPD traffic to VPN connected machine?
Azure Load Balancer supports virtual machines or virtual machine scale sets as it's backend pool endpoints along with addition of instances via network interface or IP addresses. However, a backend pool configured by IP address has the following limitation:
The backend resources must be in the same virtual network as the load balancer.
Reference : https://learn.microsoft.com/en-us/azure/load-balancer/backend-pool-management#limitations
So, you cannot add a VPN connected on-premise machine in the backend pool of the load balancer. There is an active feature request for this and it is under review by the load balancer product group team. You can upvote this feature request in the below forum for future improvements:
https://feedback.azure.com/d365community/idea/49c222f6-8726-ec11-b6e6-000d3a4f0789

Azure AKS Network Analytics- where are these requests are coming to Kubernetes Cluster?

I am little but puzzled by Azure Network Analytics! Can someone help resolving this mystery?
My Kubernetes cluster in Azure is private. It's joined to a vNET and there is no public ip exposed anywhere. Service is configured with internal load balancer. Application gateway calls the internal load balancer. NSG blocks all inbound traffics from internet to app gateway. Only trusted NAT ips are allowed at the NSG.
Question is- I am seeing lot of internet traffic coming to aks on the vNET. They are denied of course! I don't have this public ip 40.117.133.149 anywhere in the subscription. So, how are these requests coming to aks?
You can try calling app gateway from internet and you would not get any response! http://23.100.30.223/api/customer/FindAllCountryProvinceCities?country=United%20States&state=Washington
You would get successful response if you call the Azure Function- https://afa-aspnet4you.azurewebsites.net/api/aks/api/customer/FindAllCountryProvinceCities?country=United%20States&state=Washington
Its possible because of following nsg rules!
Thank you for taking time to answer my query.
In response to #CharlesXu, I am sharing little more on the aks networking. Aks network is made of few address spaces-
Also, there is no public ip assigned to any of the two nodes in the cluster. Only private ip is assigned to vm node. Here is an example of node-0-
I don't understand why I am seeing inbound requests to 40.117.133.149 within my cluster!
After searching all the settings and activity logs, I finally found answer to the mystery IP! A load balancer with external ip was auto created as part of nginx ingress service when I restarted the VMs. NSG was updated automatically to allow internet traffic to port 80/443. I manually deleted the public load balancer along with IP but the bad actors were still calling the IP with a different ports which are denied by default inbound nsg rule.
To reproduce, I removed the public load balancer again along with public ip. Azure aks recreated once I restarted the VMs in the cluster! It's like cat and mouse game!
I think we can update the ingress service annotation to specify service.beta.kubernetes.io/azure-load-balancer-internal: "true". Don't know why Microsoft decided to auto provision public load balancer in the cluster. It's a risk and Microsoft should correct the behavior by creating internal load balancer.

Azure load balancer inside a subnet

I have a VNET with a subnet, there are 3 VMs in the subnet, the VNET is connected via a VPN connection to an on-premises server. The on-premises server will send requests to an internal IP of the subnet.
What I'd like to do is host a load balancer with no public IP, but has an IP in the subnet range. The on-premises app would then talk to the single load balancer, which would in turn forward the request on to any of the servers hosting my app in the subnet.
Can anyone tell me if this is possible, or an alternative if possible.
I believe you are looking for an internal load balancer.
You can find documentation for that here: https://learn.microsoft.com/en-us/azure/load-balancer/load-balancer-get-started-ilb-arm-portal.
Azure Internal Load Balancer (ILB) provides network load balancing between virtual machines that reside inside a cloud service or a virtual network with a regional scope.
Create a Load Balancer as usual, but specify Type: Internal.
Probably best to make it use a static IP address as well so it won't change.
Then you'll need to configure its back-end pool and health probe so it knows where to route traffic.

Access own Azure internal load balancer from backend server pool

I have set up an internal load balancer (lb1) with one server (srv1) as only VM in the backend pool. When I try to access the loadbalancer lb1 from this server (srv1), I get a timeout. I have a second load balancer setup in the same subnet (lb2 and srv2). All traffic on port 443. Inbound and outbound rules allow traffic on all ports to/from subnet.
srv1 can access lb2 but not lb1
srv2 can access lb1 but not lb2
Is this by design, or have I missed a configuration option?
Is this by design, or have I missed a configuration option?
This is a by design behavior. The load balancer is used for redistributing the request to the VMs in the backend pool. The VM in the pool can not access the load balancer in the same pool.

Azure secured connection for Load balancer?

we are creating a virtual machines in resource manager portal with internet facing load balancer. In virtual machines we have more than 10 web application running in different ports. we have port mapping in load balancer to access application as public. Now our requirement is how can we make secured connection for all applications? can we make "https" for load balancer public IP?
please let me know if any possibilities to make secure connection for loadbalancer.
Thanks,
Selva
you can go with Azure application gateway to do the external SSL termination.Then setup an internal loadbalancer to do the routing.
https://azure.microsoft.com/en-in/documentation/articles/application-gateway-ssl-arm/
https://azure.microsoft.com/en-in/documentation/articles/application-gateway-ilb/

Resources