Azure VM End point unreachable - azure

Below is my scenario. I have created an Azure VM endpoint. This endpoint is configured to listen on port xxx. The same port number is configured as both public and private port (on the endpoint). This port number within the VM is actually a port that SQL Server endpoint is linked to.
Then I have added an ACL to allow traffic only from a specific public IP. i.e our office public IP.
Now I am trying to connect to SQL Server remotely through this new port and I am not able to. Locally on the VM this SQL Server port is functioning as it supposed to.

Related

How to enable http requests on Azure Virtual Machine

I have an Ubuntu VM in Azure with inbound port rules configured as shown:
As you can see, HTTP connections are allowed, however I am unable to telnet the public IP from my computer on port 80. I have also tried to check the HTTP connection from the Azure portal and it shows that connectivity is allowed.
Is there anything else that I should do to be able to telnet to this VM?

SignalR server application on the Azure virutally

I try to run self-hosted SignalR server application, the server on the Azure virutally
const string ServerURI = "http://<myip>:8080";
SignalR = WebApp.Start(ServerURI);
The server is not created.
If you create a local server then all is well
const string ServerURI = "http://localhost:8080";
An inbound port rule is created.
On a separate VPS everything works fine, but on Azure is not...
When you provision a new VM, Azure adds a default Network Security Group (think of it as a firewall) that allows RDP traffic (TCP port 3389) from any connection and denies all traffic going to your VM on any other port.
Since you want port 8080 to be accessible from the outside, you will need to add an NSG rule that explicitly allows port 8080 in.
Documentation on how to add an NSG rule on an existing NSG:
https://learn.microsoft.com/en-us/azure/virtual-network/virtual-networks-create-nsg-arm-pportal#create-rules-in-an-existing-nsg

Azure VM (ARM) external port not working

I am trying to open port 8080 in a Windows Azure virtual machine. I have a test website listening in that port, and I am able to access it via localhost, so the website is running.
I have also opened the port in the firewall and created an inbound security rule in azure portal for the virtual machine, but the port doesn't seem to be open to the outside world. I have tried accessing it both via the IP address and the DNS with the same results.
Is there anything else I should be doing?

Connection to azure virtual machine public port is timed out

I am using Azure Virtual Machine (Windows Server 2008 R2 image) provided from the gallery and created Public port and private port using the portal. I did remote log in to VM and I run a TCP server application inside VM (TCP server binds to the private port of the VM). Problem I face is that I can not connect it through the public IP and port (from external machine). I have created a inbound rule in VM's Firewall, where I enable connection to the Private port of VM. I tried recreating the VM, also the new ports. Still problem persists. One more thing I observed is that my TCP Client is able to connect to RemoteDesktop port of the VM also the PowerShell port. But does not connect to the port that I created through the portal. Pls suggest what can be wrong?
Note: I also observed some weird behavior. I enabled all ports for my TCP Server app in Inbound rule of firewall and found that some unknown IP (was similar to azure internal IP) is connecting to my server. Why it is happening?
I would like to understand as to how you are trying to connect with the Virtual Machine, using RDP or trying to test the connectivity, for example, using Port Ping.
Endpoints for RDP and Powershell are configured by default. So if you are trying to connect using Remote Desktop, you can directly connect to the VM using MSTSC from Run and provide the IP of the VM followed by the Port Number using the below format
xx.xx.xx.xx:3389
However if you would like to test the connectivity to the VM, I suggest you to use Port Ping instead of ICMP ping since ICMP traffic is blocked by the Azure load balancer and the ping requests timeout. While Ping.exe uses ICMP, other tools such as PsPing, Nmap, or Telnet allow you to test connectivity to a specific TCP port.
On the other hand, after creating the VM, you can add endpoints additionally as needed. You can also manage incoming traffic to the public port by configuring rules for the Network Access Control List (ACL) of the endpoint.
The private port is used internally by the virtual machine to listen for traffic on that endpoint.
The public port is used by the Azure load balancer to communicate with the virtual machine from
external resources. After you create an endpoint, you can use the network access control list
(ACL) to define rules that help isolate and control the incoming traffic on the public port. For
more information, see About Network Access Control Lists.

Private Ports in Azure Virtual Machine

What is the concept of Private Ports in Azure Virtual Machines? What is its key advantage or use case. There scenarios I checked that for the RDP endpoint the Public Port is 3389 and private is takes up some random port number.
In order to access the VM via RD, I am forced to open that private port as well to access that. In few places I have seen for an HTTP endpoint both Private Port and Public port are made 80 for access?
What is the theory behind this?
Windows Azure places all of your Virtual Machines behind a load balancer. All of your virtual machines can open outbound connections. For inbound connections, you need to explicitly open ports in the firewall. These are input endpoints and instance input endpoints:
Input endpoints are used when you'll load-balance traffic across virtual machines (e.g. a web server)
Instance input endpoints would allow you to have a connection straight to a specific virtual machine (e.g. a database server)
Now, regarding public and private ports: Public ports are the port numbers exposed to the outside world. So for a web site, maybe that's port 80. You can then map that port to a port on the virtual machine itself. Maybe you run your web server on port 8000 for some reason. In this case, you can map public port 80 to private port 8000.
Now imagine SSH. SSH likes to listen on port 22. But if you have, say, 3 Linux vm's in a single service, there's simply no way to access all of them on port 22, since they all share an ip address. Therefore you'd need a specific port number for each machine. In this case, you'd assign, say, port 20000 to vm1, 21000 to vm2, etc. on the public port side, as an Instance Input Endpoint pointing to a specific virtual machine instance at port 22 on the private port side.
Hopefully that makes some sense... :)

Resources