Opening port on classic azure virtual machine - azure

I have created inbound and outbound rule on the virtual machine to allow any connection to port 5100 over tcp.
I have created an endpoint in the new Azure portal for TCP and public/private port 5100, but for some reason I can't comprehend I still can't connect.
I tried to turn off the firewall on the virtual machine, but still I can't connect to the virtual machine.
I have previously done this for port 80 with no problems. Does anyone know if Microsoft have changed anything that affects the classic vm's and endpoint configuration?

We can add endpoints via New Azure portal in this way:
We should make sure the update endpoint completed.
Hope this helps:)

Related

Azure VM Port for Localhost

So I'm using an Azure VM that has a public IP address, and I've opened an inbound port, let's say it's 5555.
What I'm trying to do now is to run an application on the VM that has an API via localhost, also with the port 5555. I'm calling it then with public_ip:5555/api/...
Since I was not able to connect to the application from outside, is there something missing here? Most tutorials and resources I've found just mentioned opening the port.
Thanks.
Take a look at Azure's IP Flow Verify utility, which will check your NSG rules to ensure traffic can reach your VM. https://learn.microsoft.com/en-us/azure/network-watcher/network-watcher-ip-flow-verify-overview
If traffic is reaching your VM, check your host firewall and then your application server logs.

Unable to connect to Azure VM through RDP but able to connect through Bastion

I was able to connect to Azure VM through RDP earlier but now suddenly I'm unable to connect to VM through RDP.
I tried to connect through Powersell.
Even powershell script was able to connect earlier but not working now. Myself didn't changed anything in Azure VM.
I'm getting below errors.
But I'm able to connect to VM through Bastion.
WinRM is already enabled in Azure VM.
I tried by creating new Azure VM and enabled RDP port 3389 but still getting same connection issue.
How to resolve issue.
When debugging RDP issues one tool I use to test connectivity from a windows client is:
start
run
cmd
telnet ip port
e.g telnet 99.99.99.99 3389
noting you may need to install the telnet client from windows features tool
Try this from multiple locations with different public addresses (including from the VM itself in some circumstances but clearly not for your issue).
Does it connect to the RDP Server listening port ?
If the answer is yes then you know the server is listening.
If the answer is no then the port is likely blocked, service is not available or a routing issue could be the cause.
Thinking out loud review the resources you have sitting in front of the VM:
window firewall (Disabling all firewall profiles is a more foolproof way of troubleshooting than setting the RDP-specific firewall rule, see REF)
local network outbound traffic blocks
firewall in front of the vm
Ref:
https://learn.microsoft.com/en-us/azure/virtual-machines/troubleshooting/enable-disable-firewall-rule-guest-os

Enabling port for tcp in Azure VM

I have created a Windows WCF Service and I want to host it inside Azure VM.
The service is locally running fine inside the VM, but when attempting to access the service outside of the VM, I cannot connect to the service at the specified port.
While requesting the service, I'm getting the following error:
SocketException (0x274d): No connection could be made because the target machine actively refused it...
Also, while pinging the VM through the command prompt with public ip, I'm getting Request timed out.
I have enabled the port for TCP in Azure inbound rules as well as in VM firewall inbound rules. The VM is Windows Server.
How can I access the service running in the VM from another system?
Any help is appreciated.
check application is running on the port you exposed
check windows level firewall allows traffic on that port from your destination
check NIC level NSG allows traffic on that port from your destination
check subnet level NSG allows traffic on that port from your destination
you might also have Azure Firewall\UDR\NVA in the networking setup, check those as well (this is highly unlikely if you are not running an enterprise grade setup).

Connecting to private TCP service on Azure VM

I am testing my own TCP client/server software, trying to use an Azure VM for testing. I have done this successfully on a Azure VM that I set up over a year ago. Now I have created a new VM that I need to test with. My service is installed on the VM and is monitoring port 18971. In the Azure portal, I have created an "endpoint" for TCP for that port. The machine is running Windows 2012. I have configured Windows Firewall with inbound and outbound rules to allow all TCP traffic to/from that port. I have also tried turning the firewall off. Still, my client software does not work, I receive error 10060 on the Winsock API "connect". I tried both the domain name and the IP address.
Any ideas of what else I have to do to allow TCP traffic? I am pretty sure this is an Azure configuration problem - I have successfully tested the software on direct connected machines as well as the old Azure VM I mentioned (I see no difference between it and the one I am trying now).
I guess you use the new type of VM with a resource manager on the old portal which you have "endpoint" for TCP for that port. You have to open some ports (endpoints) on new VM via the new portal. Refer to this.
For the new type of VM with a resource manager, you have to allow the port 18971 in the inbound port rules of NSG associated with your Azure VM or subnet.
Navigate to your virtual machine settings, and find Networking---Add inbound port rule.

Trying to psping to azure machine firewall is off, but still unable to connect

I have an azure pc in Windows server 2008 r2. The fire wall is off. I have defined html, opened port 80 and evneport8080. I have defined a end point too
but when I do psping ipaddress:80 the remote computer refused the network connection. But if I try to psping ipaddress:3389 it seems to work, but not any new port I have created.
What is this msg, and will it impact my connectivity?
You will need to add an NSG rule to allow TCP traffic on port 80.
https://learn.microsoft.com/en-us/azure/virtual-machines/windows/nsg-quickstart-portal
By default, an NSG rule is added to allow only port 3389.
According to your description, we should check your web service is running or not, we can use netstat -ant to check it.
Update:
Does your VM create in Azure classic module?
if yes, we should add endpoints to your Azure VM via azure portal, like this:
More information about add endpoints, please refer to this link.
Also we can add endpoints in Azure classic portal:

Resources