Network Security Group (NSG) associated with your VMSS describes what inbound and outbound requests are allowed for your virtual machines. In Load balancer template we should define a pool in inboundNatPools section: For instance, if we open one of the rules we’ll see a rule which states that all requests over TCP which arrive at IP 20.69.134.228 at port 50002 should be forwarded to VMSS instance 2 at port 3389 (or 22 for SSH).īelow is shown how inbound NAT pool should be set up using ARM templates. Azure Portal Viewīelow is an example how it looks like for a load balancer for VMSS with two instances. When creating a resource through Azure Portal, these inbound NAT pool and rules are set up by default but it’s better to check whether they are present especially if you create your resource in a different way. Create a load balancer Inbound NAT Pool.Essentially, inbound NAT rule specifies where the load balancer should forward incoming request arriving at a particular port. Inbound network address translation rules that are configured on the load balancer help us achieve that. Since our virtual machines are placed behind a load balancer and all have one public IP address which is assigned to the load balancer, we want to use this IP address to somehow reach RDP 3389 or SSH 22 port of a particular virtual machine. To be able to connect to the VMSS we need to check that inbound NAT rules and network security group are configured correctly. If your virtual machines in a scale set have individual IP addresses, then skip the section about inbound NAT pool and rules. NOTE: Here we are discussing the case when VMSS is placed behind a load balancer. Let’s see how we can connect to virtual machines inside of VMSS from outside of the virtual network, for example, from a developer’s machine. Also, throughout the post most examples are for RDP and 3389 port, however, for SSH case it is mainly just using port 22 instead of 3389. NOTE: We will mainly discuss networking part but not detailed steps how to use RDP or SSH, there are already a lot of great articles on these topics.
0 Comments
Leave a Reply. |