1

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.

1
  • 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

5

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

6
  • 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 127.0.0.1
    – 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
5

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

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.

2

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.

1

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

0

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

3
  • 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 127.0.0.1 always refers to the local machine and must not be sent over the wire. Commented Mar 24, 2011 at 15:40
0

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.

0

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 127.0.0.1 will be blocked?

0

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.

-1

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/127.0.0.1 being blocked (And, no, like people have said, that's not possible).

2
  • 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
-1

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 127.0.3.42) 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 .