Getting Apache to work behind a netgear WGR614 wrouter


Recommended Posts

This one's got me completely stumped. I am trying to install the Apache Web server (1.3.3.37 I think) on a computer on a wireless home network. I'm using the Netgear WGR614 wireless router.

I set it up to forward port 80 to 192.168.1.5 (the computer's network IP), but when I type in the ROUTER's ip (the one supplied for my ISP) the server doesn't show up. It gives a "The page cannot be displayed" message after showing "Connecting to [router ip]..." in the status bar.

I've tried setting up the firewall on this computer to allow port 80; nothing. I've tried uninstalling the firewall entirely; same problem. I disabled anything in the router's configuration containing the word "firewall" in it; still doesn't want to work. I tried the latest version of Apache as well, but it didn't work either. I currently have 1.3.3.37 installed.

I can't for the life of me figure out what the problem is. :(

Can anyone help?

[EDIT]

Forgot to mention. . . if I type in the local IP address (192.168.1.5) into the address bar it shows the welcome page for Apache.

[/EDIT]

And why in the world would you try to connect to the PUBLIC IP address, when your on the PRIVATE side of your router???

Many routers have issues with LOOPBACK forwarding.. ie accessing the public IP from the priviate side - just so your router can forward you back into the private side.

When on the private side of the router - then use the PRIVATE addresses to access the machines on that network.. Or setup your name resolution to use the private address when looking it up from the private side..

Its is completely utterly useless to bounce off the public interface from the private side - just to get forwarded back inside, etc..

If you want someone to check your forward for you - then have one of your friends access your public IP from the public side.. or use one of the free pubic desktops to access your public IP.. cosmopod comes to mind, etc.

PM me your public IP and I would be happy to check it for you.

I don't think you understand what I'm trying to do.

If I were on a computer that didn't go through a wireless router, I could just type the IP address of the computer (such as http://123.45.67.8 ) and it would bring up the Apache server Web pages.

But since I'm on a router, the router uses that IP address and the computers on the network use it to connect outward to the internet.

So what I'm trying to do is basically combine the two, as in have the server on one computer that's accessible from outside of the home network. So if I go to my college campus and I'm on a different network, I can set up a dyndns.org address to access the computer's server.

If that's what you were trying to explain to me, then I'm sorry for the misunderstanding.

I know exactly what your trying to do -- and yes your misunderstanding!!

Your webservers Private IP is 192.168.1.5.. its public IP is 123.45.67.8 as in your example.. Your on another machine on the same private address 192.168.1.0/24 and your trying to access 123.45.67.8 --> This rarely works, it is called a loopback forward..

Trying to access the routers public IP (123.45.67.8) from the private side 192.168.1.6, just so it can forward you back into 192.168.1.5 There is NO POINT to doing this!

if your on the same network as the webserver -- ie connected to the same router, then use its private IP to connect to it 192.168.1.5

If you on the outside, school, an inet cafe, your friends network - then you would use the PUBLIC ip of your router, or whatever dynamic dns you might have setup kevinmd98.dyndns.org for example..

Do you understand now?

I think so. . . but I never had a problem doing this before. :/ In the past I've made a Web server on 192.168.1.5 and been able to forward the port 80 to that computer and access it from my own browser via my dyndns.org address.

I know it's inefficient to use 192.168.1.5 to access the public router IP which will direct me back to my own computer anyway, but if it doesn't work for me why would it work elsewhere?

[EDIT]

Also, if I were to use the 192.168.1.5 address to access my server from my own network, I don't see how I would dynamically change the links on my Web pages to 192.168.1.5 instead of my dyndns.org address, without changing it for people outside of my network. :/

[/EDIT]

  kevinmd88 said:
I know it's inefficient to use 192.168.1.5 to access the public router IP which will direct me back to my own computer anyway, but if it doesn't work for me why would it work elsewhere?
  BudMan said:
Many routers have issues with LOOPBACK forwarding.. ie accessing the public IP from the priviate side - just so your router can forward you back into the private side.

I have the same problem.

nightiguana.no-ip.org is my outside address.

192.168.2.3 is my private address.

In my hosts file, I just use the line:

127.0.0.1 nightiguana.no-ip.org

to bypass the loopback issue. For users outside of my router, I just forward the necessary ports.

  kevinmd88 said:
Haha, I just tried adding it to my hosts file and it worked. Then I come here and see it's what I should have done, so I feel proud. ;)
What that I told you to do that way back in my first post..

"Or setup your name resolution to use the private address when looking it up from the private side.." And you were too dense to figure it out??

I would not even consider a bud light a beer jimbo! But I am very relaxed thank you..

It just gets frustrating -- its like talking to a freaking wall around here.. Are people really that dense??

As to why it would work elsewhere -- and did you have the exact same router elsewhere? I stated many routers have an issue with loopback, not all of them.. Some models have allowed for it with firmware updates.

For example an old linksys router I had BEFSX41

firmware 1.45.3 Sep 26, 03

12. Fixed internal loopback issue

Even if your router supports loopback forwarding.. Why would it make any sense to bounce off your router to hit a machine that is on the same lan as you?? If your on the same network as the machine your trying to talk too, why would you use an IP that has to be forwarded back into that same network by your router? Is that the most efficient way to talk to a machine next to you?? -- or your same machine for that matter.. Bounce the traffic off a router - and make it forward it back?

I am glad you got it working -- you should feel proud, what an accomplishment - accessing a machine on the same network as you ;)

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.