Search code examples
iisnetwork-programmingrouteswindows-server-2012nat

Windows Server 2012 with IIS can't connect to it's own public IP


I encountered a very strange issue I've seen more often but could workaround. A VPS with Windows Server 2012 on it and IIS installed is unable to access its own webpages by its public IP.

When I open up Internet Explorer on the VPS and goto localhost, I see the default IIS page. Whenever I try the public IP, it times out.

If I access the same IP from another PC, I can also see the IIS page.

I've tried pinging to my public IP from the VPS, this works. I then tried to disable my firewall all to no avail.

Has someone encountered this before? And more importantly: Did you manage to fix it and if so, how?


Solution

  • Most likely then this is a NAT issue caused by how the NAT gateway/router is configured your connections go via. I'd recommend talking to your host and confirming whether this is the reason and if they are willing to do anything to resolve it. That might be difficult if it is a limitation of the router or done for security reasons that they are unwilling to change.

    Running some Wireshark traces should be able to confirm what is happening.

    You may be able to resolve it your self with Split DNS and the use of a domain name rather than direct to an IP address. Why do you need to use the IP specifically?

    Read serverfault.com/questions/216569/cant-ping-static-ip-from-internal-network-only-from-outside for some further insight.