Timeout attempting to reach Azure VM - azure

For a pet project I'm attempting to spin up a VM on Azure that can run as my webserver, providing an Umbraco powered site, as well as some other web applications (such as a forum + planner) that require PHP. Now I've followed the steps of every guide out there, but I cannot get an external connection through to the VM's IIS and I can't find out why.
I'm hoping someone else has been through the pain that I'm currently experiencing and might point me in the direction of whatever setting I'm missing.
Spun up the VM with Server 2012 R2.
Configured it to run IIS.
Installed Umbraco, disabling the default web site and setting the Umbraco site as my default on port 80.
Checked that http://localhost maps to Umbraco - this works.
So after I had it running internally, I started tackling the external connection setup.
Navigated to the Network Security group, and added the inbound Http rule on Port 80.
Disabled Windows Firewall entirely for the sake of testing.
Added a custom dns name to the front of the xxx.[azurecloudappurl].com
Now my requests resolve but then timeout and I can't see why or where? Has anyone else experienced this? Every guide states that it should be as easy as this.

As you can visit localhost on your VM env, so it seems there is no problem with your env on VM.
Have you added the endpoint with 80 port of your VM server on Azure manage portal? As by default, the endpoint with 80 port is not opened.
You can refer to How to set up endpoints on a classic Azure virtual machine for how to add an endpoint on Azure VM.

In addition to #Gary Liu's answer if you are doing it on Azure Portal(and not on classic one).
For any new VM added through Azure exists a Network Security Group (NSG). Ports need to be opened in order to make them accessible from outside the VM. Specifically to allow your VM to serve requests coming to port 80 you need to enable HTTP port in Network Security Group. Here are the steps:
Search for VM Name on Azure portal.
Select the VM by Clicking on VM Name.
Click on Network Interfaces from left menu and select(double click) the listed one. This will show overview of Network Interface.
Now click on Network Security Group.
Click on Inbound Rules.
Add new rule selecting service as HTTP(TCP/80).
Voila done!
And here is the answer to manage an inbound rule

Related

Unable to access virtual machine via internet

I have created classic Virtual Machine on Azure.Machine has created and deployed successfully and i got URL (abc.cloudapp.net). I am trying to access from internet but could not connected.I am able to login via remotely.
You first have to make sure you have a Web server such as IIS running there on the VM. Then make sure the firewall in the OS allows traffic to port 80.
If you have a classic VM, you have to add a rule in the endpoint's ACL.
If you have a Resource Manager VM, add an exception to Network Security Group's inbound security rules.
You can find the Network Security Group by finding the Network Interface Card attached to your VM. By default it is attached there.
As Juunas says, we should add the endpoint with Azure portal.
1.sign in to the Azure classic portal.
2.Click Virtual Machines, and then click the name of the virtual machine that you want to configure.
3.Click Endpoints. The Endpoints page lists all the current endpoints for the virtual machine. (This example is a Windows VM. A Linux VM will by default show an endpoint for SSH.)
4.In the taskbar, click Add.
5.On the Add an endpoint to a virtual machine page, choose the type of endpoint. And type the port number for the incoming traffic form the internet, in private Port, type the port number on which the virtual machine is listening.
More information about add an endpoint, please refer to the link below:
https://azure.microsoft.com/en-us/documentation/articles/virtual-machines-windows-classic-setup-endpoints/
If you still have questions, welcome to post back here. Thanks.
Best Regards,

Setup Azure Network security group rules for Octopus Tentacle?

I've been trying to setup my Azure Network security group to accept connections to my Octopus Tentacle, but with no success.
I know the Tentacle is properly working because I can connect using localhost, all that's left is to be externally available.
Could anyone shine a light on the necessary rules at the Network security group? Find below my own rules.
Kind regards and thanks in advance!
Open Windows Firewall on your VM. And add an allowed access for
"10933" TCP port. (10933 the default port between Octopus server and tentacle)
If your Octopus Server and tentacle are not on the same Azure
resources and still couldn't telnet the Tentacle, You must add an "Inbound
security rule" for the same 10933 TCP port which used by your VM's
network security group.
Optional:You should give a static IP and domain name to your VM on Azure. Your Network admin should configure it a IP restricted access.
For testing the connectivity. You should use "telnet client". Open cmd and write this. If there is no connection error/timeout it's working .
telnet yourtentaclesextrenalIPaddress 10933
You should add the endpoint and firewall settings on your virtual machine firewall (not the Azure you mentioned). This is the official tutorial on how to set up the Tentacle. Also take a look if your OS you want to launch Tentacle on is supported (the same link).

Website Setup On Azure VM

I've been running the free trial and am trying to point of my name cheap domain to the vm web site I have created.
I covered the server Ip.
Here are my namecheap settings for the domain.
The covered Ip is the same as above..
Here are my IIS settings
Change the Hostname to my actual domain.
I've also disabled Windows firewall and added port 80 and 443 in the security app hooked to the Azure VM. I can't seem to connect to the website at all. Am I missing something? I've been troubleshooting for hours and cant find anything except basic tutorials and how to do it on the Classic Azure portal.
thank you.
If you are using V1 (old portal/classic) Azure VM resources, then you need to open up the endpoint on the cloud services. All VMs exist as part of a Cloud Service.
From the new portal,
Select the VM (Classic)
Settings
Endpoints
Add the required port (make sure public port is the one you want to use, say 80, and the internal port is the one IIS is listening for)
If you are using V2 resources, you need to add a public IP to your VM before it can be reached from the outside world.
From the new portal
Click on the VM
Open settings
Select Network Interfaces
Select IP Address
Enable public IP (and add a PIP)
Keep in mind that in Azure, all IPs are dynamic. You will want to configure DNS settings against the DNS names provided, and not the IP address (as this will change if you power off the machine). For V1, use the cloud service name. For V2, you are given the option when creating the PIP to have azure assign a DNS name.
For testing, try to telnet on port 80 to the correct DNS name.

SSRS Reports hosted in Azure Virtual Machine not available outside the VM

I have created an ssrs report inside an Azure Virtual Machine (SQL Server 2012 SP1 on Windows Server 2012). When I try to view the report from the Virtual machine it opens up in the browser with a proper url like
http://mysamplevm/ReportServer/Pages/ReportViewer.aspx?%2fMySampleReport&rs:Command=Render
When I try to open the same url from my local machine, it says webpage is not available. I have completed the following settings too.
Created Inbound & Outbound rules in Virtual Machine Firewall for port numbers 80 and 443.
Created end points for the same port numbers in azure management portal.
You shall access the report server via the public DNS Name - this is sort of http://mysamplevm.cloudapp.net/ReportServer/Page, and not http://mysamplevm/. You can get this when you navigate to the dashboard of your VM in the management portal - right hand links are named Quick glance, the second is DNS Name.
Because your computer has no idea how to find mysamplevm.
While astaykov is correct regarding the URL, there are two more steps you need to go through to make your report server accessible from outside your VM:
Open HTTP/HTTPS endpoint for your VM in Azure management portal
Open a firewall port:
Open Windows PowerShell on your Virtual Machine
Run the following (for port 80):
New-NetFirewallRule -DisplayName “Report Server (TCP on port 443)” -Direction Inbound –Protocol TCP –LocalPort 80
Now you can access your report server from remote computers through:
http://yourservername.cloudapp.net/reportserver
You have to log into the VM and open windows firewall advanced settings. In Inbound settings, allow port 80 to accept connections.
In addition to what DivineOps has mentioned. In Azure portal (new version), you have to go into NSG to configure firewall rules.
For me, I had to configure inbound rules, both on VM (via RDP) and via Azure portal for it to be accessible.

Can't get Azure Virtual Machine to serve websites

I've just set up a windows azure VM and installed IIS on it.
When I remote desktop onto the box I can see the default IIS website fine but I can't get this to serve on the web from the IP address of the box.
I've opened up port 80 on windows firewall and also added an endpoint for port 80.
I've tried to access it with the firewall completely turned off also but to no avail...
I cant work out if there is anything else I need to do to get this working?
Add endpoints for port 80 (http) and port 443 (https) to the VM in the Azure portal (tip: this can be automated with powershell or the Azure cli).
Remote desktop to the machine. Open the Windows firewall control panel and allow traffic to port 80 (http) and port 443 (https) or just turn it off ... the firewall is ON by default (tip: can also be scripted through the VM agent / powershell).
Go to the Azure portal and find the cloudapp.net subdomain for your VM (actually the cloud service) your VM is running under. Try accessing the site with that domain. If that doesn't work, try browsing to http://localhost on the server (remote desktop) to make sure IIS works and troubleshoot from there.
Modify the DNS records of your custom domain to use a CNAME to the .cloudapp.net domain. If you need A records make sure to use the public IP of the cloud service (just ping the .cloudapp.net domain to find it or look in the Azure portal).
You might want to look into Azure Websites or Azure Cloud Services (web roles). Those are a lot easier to manage and a lot cheaper. They still offer most of the functionality.
What fixed the issue for me was to go into the Azure Portal, browse to 'Network Security Groups', select the VM and then create an inbound rule to allow traffic to port 80.
Note: Also ensure that the inbound rule to port 80 is added and enabled on the actual VM.
Well, I deleted the existing VM and Cloud service and started again - all worked fine out of the box this time.
How annoying! The only thing I did notice was that before my cloud service had the same name as my VM - this time they had different names so that might have been what was causing the issue.
Cheers
For the newer VMs and pre-configured setups (2015+), it's possible your setup is using an azure asset called "Public IP". If so, you can set a custom DNS name label in it, inside "Configuration". Note that this name will consider any type of region used when creating the VM (e.g. my-site.brazilsouth.cloudapp.azure.com).
It's good to remember that for testing purposes, it still suffices to use the value of the public IP that is randomly designated to you.
The VMs are actually accessed via a Cloud Service (well they are for me). Azure created a Cloud Service automatically to be the scaling engine/load balancer on the front of the VM. I have to connect to the web site via that cloud service, not the VM directly.
Its possible you were using the internal IP rather than the external IP.
The sites have to use the internal IP address in the bindings section of IIS. However, in your dns you will need to use the external IP. This is presumably since the 'internal IP' is just a virtual one that Azure uses to map traffic from the external network to the VM's inside azure.
You should find both the internal and external IP's are visible on the VM's desktop.
Switch off TLS 1.3 in the Registry Editor.
This is what worked for me as of writing this in Mar 2021.

Resources