You are not logged in.

#1 2011-12-21 17:42:41

MONODA
Member
Registered: 2008-02-09
Posts: 256

Access Web Server Behind Router and ADSL Modem

So Ive setup a web server which I have been able to successfully access via the 192.168... IP but have been unable to access it through the internet. I have enabled port forwarding on ports 80 and 22 (for ssh) in both my router and modem. I have successfully ssh-ed into the server using the public internet address through port 22 so I guess that means that Ive properly setup the server. When I load the public IP in a web browser expecting the web page to be served, I am taken to the config page of the router (Speedtouch 546v6) and cant find a way to access my web page even though I have enabled port forwarding and configured the modem and disabled the feature which loads the config page by default. It seems that port 80 is closed and port 22 is open. When I run "# nmap localhost -p 1-65535" on my server, I am told that they are both open.

Thanks in advance and let me know if any information would be helpful.

Offline

#2 2011-12-21 18:05:41

R00KIE
Forum Fellow
From: Between a computer and a chair
Registered: 2008-09-14
Posts: 4,734

Re: Access Web Server Behind Router and ADSL Modem

Try to disable the web interface configuration from the wan/internet side, there should be some way to do it. Having the web configuration interface enabled for the internet side is causing you trouble, not to mention that it can be a security problem.


R00KIE
Tm90aGluZyB0byBzZWUgaGVyZSwgbW92ZSBhbG9uZy4K

Offline

#3 2011-12-21 18:17:29

MONODA
Member
Registered: 2008-02-09
Posts: 256

Re: Access Web Server Behind Router and ADSL Modem

I've done that but havent noticed any change

Offline

#4 2011-12-22 07:08:57

zenlord
Member
From: Belgium
Registered: 2006-05-24
Posts: 1,221
Website

Re: Access Web Server Behind Router and ADSL Modem

Have you tried the obvious, making your webserver listen on another port than 80 (f.e. 443 for https or a randum portnumber, higher than 10000) and try to connect to that port? I'm not saying this should be the definitive answer, but it might provide some more information. At this point, it seems your router is blocking access to port 80.

Offline

#5 2011-12-22 08:54:03

MONODA
Member
Registered: 2008-02-09
Posts: 256

Re: Access Web Server Behind Router and ADSL Modem

How would I generally go about doing that, Ive search around on google for changing the port number that a lamp server uses but havent come up with anything helpful. Maybe someone could point me in the right direction?

Offline

#6 2011-12-22 12:05:46

R00KIE
Forum Fellow
From: Between a computer and a chair
Registered: 2008-09-14
Posts: 4,734

Re: Access Web Server Behind Router and ADSL Modem

Have you tried looking into the configuration files? Specifically into the Apache configuration file.


R00KIE
Tm90aGluZyB0byBzZWUgaGVyZSwgbW92ZSBhbG9uZy4K

Offline

#7 2011-12-22 16:53:16

zenlord
Member
From: Belgium
Registered: 2006-05-24
Posts: 1,221
Website

Re: Access Web Server Behind Router and ADSL Modem

Yes - generally Apache has to be altered in two places:
* The 'Listen'-directive is probably to be found in /etc/httpd/ports.conf or similar
* The 'NameVirtualHost *:80' and '<VirtualHost *:80>' should be changed to the new port (if you're serving from a virtualhost and not from a folder)

And BTW, Google 'apache +ports' = 1st hit: http://httpd.apache.org/docs/2.1/bind.html

Last edited by zenlord (2011-12-22 16:56:43)

Offline

#8 2011-12-22 17:02:20

gazj
Member
From: /home/gazj -> /uk/cambs
Registered: 2007-02-09
Posts: 681
Website

Re: Access Web Server Behind Router and ADSL Modem

Have you tried the web address from outside your lan?  Use vtunnel.com to test it, it is probably working.

My router serves it's config page when accessed from local lan and only redirects to my webserver when accessed from an external address.

Last edited by gazj (2011-12-22 17:07:13)

Offline

#9 2011-12-22 23:58:02

MONODA
Member
Registered: 2008-02-09
Posts: 256

Re: Access Web Server Behind Router and ADSL Modem

So Ive tried accessing the server through vtunnel but am getting this error message:
"CGI Error
Couldn't connect to {serverip}:80: No route to host"
Any ideas?

Offline

#10 2011-12-26 08:51:32

zenlord
Member
From: Belgium
Registered: 2006-05-24
Posts: 1,221
Website

Re: Access Web Server Behind Router and ADSL Modem

^^
As I said earlier: something is probably blocking port 80. Try setting a different port [1] and connecting to that port first - only then you can be sure something is blocking port 80.

[1] Make it a port higher than 1024 - my ISP blocks all (well, of course not all, but you get my point) outgoing traffic in the range 1-1024 because we are forbidden to run a server. Setting it to 8080 (which is the most common solution to solve this problem), does the job.

Offline

Board footer

Powered by FluxBB