I just spun up a VM on Azure, then set up IIS with the usual defaults, and the usual default website.
When logged on to the server (2008 R2) with Remote Desktop, I can enter in the public or internal IP address and see the default IIS 7 website.
However, from outside, the website is not contactable.
When I look at the bindings in IIS, it shows the internal address, but not the external IP address.
Is there something else I need to do to make the external IP address work?
Greg
Spinning up an VM does not make it public accessable. Your VM is linked to a cloudservice which acts as a loadbalancer (for 1..x VM's).
In the cloudservice you can configure which public ports are available and passed through to your VM's.
So in the cloudservice you have to configure that it will pass port 80 (or 443) to your VM's.
Related
Currently I have a https website setup locally on the Azure VM
with a custom hostname : <websitename>.<domainname>.com and bound to the localhost 127.0.0.2
in the hosts.etc on port 443
Consider example hostname as web.microsoft.com
Website bindings in IIS are
type:https
hostname:web.microsoft.com
port:443
IP Address:127.0.0.2
Hosts.etc
127.0.0.2 web.microsoft.com
In order to access it locally on the VM itself https://web.microsoft.com/admin/login.aspx works fine.
Port 443 is open on the Azure VM and inbound firewall rule is set in windows to allow connections on 443
If I try to access it outside of the network using the public IP address this doesn't work
eg https://45.60.200.110/admin/login.aspx.
I have other non-https websites which work fine and can be accessed through the public IP ,only difference is they are not having hostname in the IIS website bindings.
Am I missing something or do I need to make some additional config?
That's the problem.
The customized hostname cannot be accessed through the external network. Because the public network does not know this hostname, nor does it bind the hostname to your IP.
For example, you can enter other custom host names at will in the browser, and you will find the same error displayed.
The solution is that you need to purchase an available public domain name from the domain name provider and bind it to IP address.
If you insist on using custom domain name, it can only be used on the internal network. In addition to the configuration made on the server side, it is also need to add the host name and IP address in the hosts file of the client machine.
45.60.200.110 web.microsoft.com
I'm hoping someone can help with this.
I have an existing Azure Virtual Machine which has been running fine for ages. It has a single NIC with both a static Private and static Public IP Address.
I have been hosting a site in IIS for a long time bound to the (only) private IP Address on the machine, and everything has been dandy.
However, I wanted to add a second site, and because I'm using SSL and different certificates I wanted to use an alternative public IP Address.
I have created a new Public IP (static private and public address) and associated it with a new NIC. I have then added that NIC to my virtual machine.
I ALSO added Inbound rules on the Virtual Machine Networking settings to accept inbound traffic on ports 80 and 443 for BOTH NICs.
When I login to the VM I can see the new network adapter, and IPCONFIG is showing it has the correct static private IP address which I specified. So I setup the new IIS site, and added the bindings. For this "Hello World" proof of concept I have left the hostname and SSL bindings out. I just basically have it bound to the Private IP Address on Port 80.
Note - the "site" itself at this point is just a static "Hello World" HTML page. There is no managed code or any server-side or client-side funkiness of any kind.
So I basically have the following setup:
NIC 1
Private IP: 10.0.1.4
Public IP: X.X.X.X
NIC 2
Private IP: 10.0.1.5
Public IP: Y.Y.Y.Y
IIS Site 1
Bindings: 10.0.1.4 : 80
IIS Site 2
Bindings: 10.0.1.5 : 80
I can happily access BOTH sites locally on the machine (using http://10.0.1.4 and http://10.0.1.5 respectively).
However, accessing from the internet (i.e. from my home or work computers) if I try to access the original site on http://X.X.X.X it works fine.
But trying to access http://Y.Y.Y.Y just times out. I never get any kind of response.
I have tried using host name binding (with local HOSTS entries) but still get the same problem.
Phew .. ok I know that was a long(ish) post but is there some secret setting I'm missing somewhere? Or being stupid about this?
I always assumed that for a single NIC that the Public IP would route directly to the corresponding Private IP. Is this not the case??
Thanks in advance!!
EDIT
Moving the public IP to a second IP Configuration on the first NIC seemed to do the trick.
As I don't have any real need to have more than one NIC this did the trick, although it did require me to manually add both fixed IP addresses to the IPv4 configuration of the network adapter in Windows
Here a article about assign multiple IP addresses to VM, please refer to it.
Follow this article step by step, you can use two public IP addresses to RDP that VM.
Here is the screenshot of that VM, I can RDP that VM with two public IPs:
Maybe you can use this to achieve it.
I have a server hosted on Azure. I have installed IIS on this server. I have created a basic website. I am able to see the website when i use localhost or the private IP address. I am not able to see the website when I use the public IP address provided by Azure. I have not configured this server in any other way, other than to ensure that port 80 is open in the firewall. Any ideas why can't view the website from the public IP address or a different machine?
Thank You
Any ideas why can't view the website from the public IP address or a
different machine?
If you create your VM in ARM module, We should open the port 80 on NSG(add port 80 to inbound rules), and open the port 80 on windows firewall. More information about NSG, refer to the link.
If you create your VM in ASM module, we should open the endpoint 80 on the old portal. More information about endpoint, refer to the link.
I've got a app plan (BASIC SMALL) with a private (hopefully) ip adress that can be found under Settings > Custom Domains.
When I try to access the content of the app using just the ip, it doesn't work. The site says "Error 404 - Web app not found." The hostname works just fine. When I ping the hostname it gives me the same ip adress. What do I have to do in order to be able to access it just using the ip?
That's not how Web Apps work, since you don't get a unique IP address assigned. You'll need to access it via yourname.azurewebsites.net or yourcustomdomainname.com - and then your requests are routed appropriately based on the name you provide.
If you absolutely needed a dedicated IP address, you'd need to deploy to a virtual machine.
When you host your web site on Azure web app it is bound to a virtual IP address that is shared with other web sites in the same app service plan. If you want to get a dedicated IP with your web site, please try to use Azure virtual machine with reserved IP. You could also choose App Service Environment
If you buy your custom domain, you can freely set DNS A records for that IP (it remains static). It sets binding of your domain to your web app. You can't access it directly by IP. Because on a given IP address and standard HTTP port 80, only one web can be running.
Imagine your web app could be open by entering that IP. You would "block" port 80 for zillions of other stuff running there.
If you check Properties blade there you will see a number of outbound IP addresses. If you consume some requests from web app / job / ... and have IP restriction set on the other side - you need to allow all these IPs.
As David suggested. If you really need a static IP - you need to run VM and set IP address as static or set VNet for web app.
How do i map my dns(www.mydomain.com) to my website which is hosted on my virtual machine.
Things i already done.
Created virtual machine in Azure.
Added endpoint on public port 80, private port 80
Website hosted on IIS, and can access via localhost (inside virtual machine) and even via http:// ipaddress/sitename/ (outside of virtual machine)
I already have a DNS name in godaddy.
Also if i have more than one website hosted on my IIS, how do i map to corresponding domains.
Now you need to create DNS record for your VM.
See how to do that at http://support.godaddy.com/help/article/680/managing-dns-for-your-domain-names
You have got two alternatives here:
Create A record (DNS name to IP, e.g. subdomain.example.com -> your VM VIP).
Public Virtual IP (VIP) adress can be found in the VM configuration on manage.windowsazure.com, on the right pane.
Create CNAME record (DNS name to another DNS name, e.g. subdomain.example.com -> VM-Name.cloudapp.net)
DNS Name of your VM can also be found in the VM configuration, on the same right pane.
After that, set appropriate Host Name (e.g. subdomain.example.com) in IIS site binding so that you can reuse the same port (80) for other sites, binding different Host Names for them.
If you need your site to response for localhost or other DNS name, just add it as another binding (see screenshot).