Corporate firewall blocking localhost/127.0.0.1

39

Solution 1

I'm sorry to tell you...

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

When you access localhost or 127.0.0.1 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

Solution 2

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

Solution 3

Your corporate firewall can't block 127.0.0.1. Only a local computer firewall can, and I've never seen one that does by default.

127.0.0.1 is a special IP, it's a loopback to your own TCP/IP stack.

Solution 4

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

ReturnReturn

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 127.0.0.1 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.

Solution 5

Another app on 127.0.0.1

I assume another corporate application is running on 127.0.0.1/a/b/c/unknown.xxx 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.

127.0.0.1 <> Localhost

Furthermore fyi 127.0.0.1 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

Browser

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

Share:
39

Related videos on Youtube

Amit Dhangar
Author by

Amit Dhangar

Updated on September 17, 2022

Comments

  • Amit Dhangar
    Amit Dhangar almost 2 years

    my question is that......

    I want to host my content management system without java dedicated server,Because of high Cost of java server.And what framework is beneficial for me to make content management system in java......

    Help please,Thank you from my side.

    • Pricey
      Pricey over 13 years
      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.
    • Uwe Plonus
      Uwe Plonus over 9 years
      The second part of the question is a request to find a provider for you which is off topic for this site. And the first one is difficult to answer now and will also lead to opinion-based answers...
  • Nathan
    Nathan over 13 years
    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.
  • user1686
    user1686 over 13 years
    @Atrox: Then it is a proxy server in your browser's configuration, not a firewall, doing the blocking.
  • FJ de Brienne
    FJ de Brienne over 13 years
    Do you have a proxy set up? if so then you need to tell it to not use the proxy for 127.0.0.1
  • user1686
    user1686 over 13 years
    Loopback does not even reach the physical network cards; it's processed internally by the TCP/IP stack.
  • Nathan
    Nathan over 13 years
    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.
  • Rich Homolka
    Rich Homolka over 13 years
    This doesn't add a solution, just a different webserver.
  • skub
    skub over 13 years
    "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!
  • Olli
    Olli over 13 years
    Well, well. "Corporate firewall" could be local software firewall (assuming wrong terms), probably centrally managed.
  • JJ_Australia
    JJ_Australia over 13 years
    Incorrect; in Windows 7 (probably Vista too), loopback is resolved by the internal DNS resolver as noted in their hosts files.
  • user1686
    user1686 over 13 years
    @Atrox: It would be an unimaginably stupid setup, then, considering that 127.0.0.1 always refers to the local machine and must not be sent over the wire.