Is there some way I can access this without having it go through the corporate firewall at work? I'd like to set up a quick little production (WAMP) environment before moving things to the final server.

Got this fixed, had to bind Apache to a specific IP. Also, the loopback DOES go through the corporate firewall here; I called the IT guys about it.

  • 4
    Bah, only just realised you'd found the answer to your question anyway. I 'think' the correct behavior is to write your own answer and accept it.
    – Pricey
    Commented Mar 23, 2011 at 17:00

11 Answers 11


I'm sorry to tell you...

But localhost and are not processed by your corporate firewall...

When you access localhost or this is handled by your computer itself using the hosts file

So you should just be able to set it all up without a problem.

If you do have trouble with wamp, please be a bit more specific and comment below

  • Hmm, I'd swear it was the corp firewall. There's no firewall running on the local machine, and it brings up the default "site blocked" message when I try to access it by either address.
    – Nathan
    Commented Mar 23, 2011 at 16:16
  • 1
    @Atrox: Then it is a proxy server in your browser's configuration, not a firewall, doing the blocking. Commented Mar 23, 2011 at 16:18
  • 5
    Do you have a proxy set up? if so then you need to tell it to not use the proxy for
    – Majenko
    Commented Mar 23, 2011 at 16:18
  • 1
    Well, well. "Corporate firewall" could be local software firewall (assuming wrong terms), probably centrally managed.
    – Olli
    Commented Mar 23, 2011 at 18:08
  • Incorrect; in Windows 7 (probably Vista too), loopback is resolved by the internal DNS resolver as noted in their hosts files.
    – Hello71
    Commented Mar 23, 2011 at 21:56

This might be a browser setting fault. Make sure they are set not to use any proxy for connections to localhost.

  • In Firefox, Preferences/Options > Advanced > Network > Settings

    Make sure 'Advanced Proxy Settings' are picked and you have appropriate values in "No Proxy For".

    enter image description here

  • In Internet Explorer, it's similar. Tools > Options > Connections > Lan Settings

    Then check "Bypass proxy server for local addresses".

    enter image description here


Your corporate firewall can't block Only a local computer firewall can, and I've never seen one that does by default. is a special IP, it's a loopback to your own TCP/IP stack.


To add my two cents:

As others have said, it's much more likely a proxy issue. You can change your proxy settings, or download a browser (Firefox doesn't need any special registry settings, though your IT dept may not approve of it) and it won't have your proxy settings obviously.

'Corporate firewall' needs a bit of definition from you. Do you mean a site wide firewall? Then it can't be the firewall, since packets to localhost never leave the machine, never see the firewall.

Do you mean a firewall on your local box, installed by your IT dept? Then, in theory, they could set up a block to localhost. But then other apps may break, this is unlikely.

The old test used to be telnet. Telnet is the basest app, and never uses a proxy.

telnet localhost 80

will hit your webserver. If you get a timeout, then you have a problem. If you get a response type in

GET / HTTP/1.0


And you should see your page. If this doesn't work, webserver has a problem, or you truly maybe have a local firewall. If it does work, you have a browser issue.

As far as other issues people mentioned, it has nothing to do with the hosts file. The hosts file just maps from name to ip address. There was a time pre-DNS and that's how all addresses were found. The special part is which is defined by an RFC to be loopback and can not be on any network.

EDIT From looking at some of your other responses, you may not have had your webserver configured properly. You should verify you have a LISTEN port on port 80 with netstat.


Another app on

I assume another corporate application is running on and given you when you access it via the browser a blocked result.

If so then configure your (I guess portable apache install) to another port e.g. 81, that should work. <> Localhost

Furthermore fyi and localhost not have the same effect when doing PHP under your Apache see: http://groups.google.com/group/hiphop-php-dev/msg/4ca5cef95367be03?pli=1


If you can not change the specific proxy settings in the companys browser (e.g. firewall is on proxy) COPY a portable browser e.g. portable firefox, this way you can change the settings


localhost/ is the loop back address on your machines network card. I don't think it is blocked by a firewall (at least not the corporate filewall) you need to give more information like what OS you are running, are there any other services running on the machine, etc....

  • 2
    Loopback does not even reach the physical network cards; it's processed internally by the TCP/IP stack. Commented Mar 23, 2011 at 16:20
  • I know what localhost is, but however they have the network set up here, literally EVERY packet is routed through the corporate firewall. I got WAMP working though, had to bind it to my specific IP address.
    – Nathan
    Commented Mar 23, 2011 at 16:22
  • @Atrox: It would be an unimaginably stupid setup, then, considering that always refers to the local machine and must not be sent over the wire. Commented Mar 24, 2011 at 15:40

Are you meaning that you trying to access this "local" installation of something through the web from "outside the firewall" without configuring the firewall? If that is the question, then the answer is set up your system on a static IP, unblock ports in the firewall, and set up forwarding in the firewall to allow external access to the box - no way around it.


It is possible, since you are on a Windows machine, that policies have been set limiting what you can do over loopback.

Is this something you have tried and had problems with, or are you just assuming will be blocked?


This might be a policy setting that you can't change. If you're using Internet Explorer, click properties, then connections tab, then Local Area Network settings. You may have a proxy server setting, if so, make sure that the "bypass proxy for local addresses" is checked. You may have to fiddle with the settings in the LAN settings dialog box, and may have to re-fiddle with them when the network proxy server is adjusted.


Use XAMPP for windows to set up a local WAMP environment without all the firewall headaches.

Its control software will get you up and running fast and you won't be bogged down with details like localhost/ being blocked (And, no, like people have said, that's not possible).

  • This doesn't add a solution, just a different webserver. Commented Mar 23, 2011 at 17:38
  • "I'd like to set up a quick little production (WAMP) environment before moving things to the final server." I think that it does, but thanks for helping!
    – skub
    Commented Mar 23, 2011 at 17:54

This is a feature of some proxy servers with configuration scripts. Even when 127.x.x.x is a loopback, you can still use addresses in the range (eg to do port forwarding tunnels which would give you the possibility of going around the proxy to get to a normally blocked site. The solution, short of examining what is being port forwarded, is to block localhost altogether. So that is that. If you have access to etc/hosts, you can try adding an entry there to a specific IP address in the localhost range. That should bypass proxy in most cases.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .