Tell me more ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.
127.0.0.1

..works

xx.xx.xx.xx (real ip)

..fails

xx.xx.xx.xx (real ip) via proxy server

..works

What is the explanation for this? Not using port 80 if that makes any difference.

share|improve this question
2  
There is not enough information to answer. Is the real IP address on the server itself or via NAT? – Paul Nov 30 '11 at 0:08
The question needs more information, please specify on what OS are your Apache installed, you are trying to test the server from the same machine, a different machine on same LAN ? The proxy server is on the same machine as the apache ? the same LAN, different LAN ? – jhcaiced Nov 30 '11 at 1:25
I am on the same machine and the proxy server is on a foreign machine. Real IP = my public IP. OS is Windows 7. – xy234gk Nov 30 '11 at 2:01
Again, is the real IP - the public IP - on the apache server or via NAT (port forwarding) – Paul Nov 30 '11 at 3:51

closed as not a real question by Spiff, Sathya Feb 7 '12 at 7:05

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, see the FAQ.

3 Answers

Your NAT does not support NAT hairpinning (a.k.a. NAT reflection, NAT loopback, etc.). Enable NAT hairpinning if you can, or get a better NAT that does hairpinning.

Here's the IETF's (the Internet standards body's) "Best Current Practices" documents on how NATs are supposed to behave in this situation:

NAT-BEHAVE-TCP:
BCP 142 (RFC 5382): "NAT Behavioral Requirements for TCP"
Section 7.2, "Hairpinning Behavior"

NAT-BEHAVE-UDP:
BCP 127 (RFC 4787): "Network Address Translation (NAT) Behavioral Requirements for Unicast UDP"
Section 6, "Hairpinning Behavior"

share|improve this answer

I'm guessing you're talking about the IP Address listed at http://www.whatismyip.com/ That is your external IP Address and you won't be able to access your Apache web server until you forward port 80 in your firewall settings on your router.

You can find documentation on how to forward your port here

share|improve this answer

That's quite normal; I'd bet you are trying within a LAN. If so, you can either use your local address (ifconfig on Linux, ipconfig on Windows) to check it out or add the aforementioned real IP to your hosts configuration file:

Linux

/etc/hosts

Windows

%SystemRoot%\system32\drivers\etc\hosts
share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.