LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   Port forwarding from netgear to apache server (https://www.linuxquestions.org/questions/linux-networking-3/port-forwarding-from-netgear-to-apache-server-483568/)

evildreamer 09-14-2006 05:34 PM

Port forwarding from netgear to apache server
 
I've installed apache which is successfull i think. If i put in to the browser http://192.168.0.2:8000 it brings up what i expect, a folder with subfolders.

If i put in http://evilbot.homelinux.com it brings up my netgear router's login page which is what i expect.

I've tried to set up the router to forward all services to port 8000 to 192.168.0.2 to presumably bring up the serving folder as above but all it says is

Unable to connect

Firefox can't establish a connection to the server at evilbot.homelinux.com:8000.



* The site could be temporarily unavailable or too busy. Try again in a few
moments.

* If you are unable to load any pages, check your computer's network
connection.

* If your computer or network is protected by a firewall or proxy, make sure
that Firefox is permitted to access the Web.

The dns server is working because it sends requests to my routers page yes? I've set the apache to listen on port 8000 because i understand low ports need root access.

Any ideas? My router is a net gear dg834gt.

Please go slow.. i'm a newbie! :newbie:

acid_kewpie 09-15-2006 09:55 AM

port forwarding forwards external requests inside your network. it does not proxy internal requests. if it did then that would mean if you hosted a normal web server you wouldn't be able to configure your router any more righ? if you connect to the normal URL you have there from the outside you get...
Quote:

Index of /

Icon Name Last modified Size Description[DIR] apache2-default/ 26-Jul-2006 18:50 -

Apache/2.0.55 (Ubuntu) Server at evilbot.homelinux.com Port 80
which seems just fine.

evildreamer 09-15-2006 11:23 AM

Thanks chris, you're quite right.... i asked someone else to test it to see if they would connect to my router like i was doing and they saw just what you have seen!! It seems when i try to access it internally it shows me the router's page but when accessed from outside my network apache shows what it's meant to!

acid_kewpie 09-15-2006 12:41 PM

yes that's right, you're clear why it does that i hope? does get annoying when you want to test your own site, but if you just use tha lan address it's fine. alternatively try using a remote proxy to reflect the request back at yourself from the remote location.

evildreamer 09-15-2006 12:56 PM

I think so... not entirely sure exactly how ports etc work but am slowly getting to grips with it. Have i got this right.... http web requests come in and automatically request on port 80? The router then knows to direct all traffic for port 80 to my server yes? And apache by default serves the web up on port 80? If i have all that right then i'm part way there at least.

Presumably the router knows only to forward external requests and internal requests just gives it's own configaration page up yes?

acid_kewpie 09-15-2006 01:25 PM

yep, 10 points for paying attention!


All times are GMT -5. The time now is 09:32 AM.