LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   Problems with webserver (https://www.linuxquestions.org/questions/linux-networking-3/problems-with-webserver-202436/)

BlueRaja 07-07-2004 11:40 PM

Problems with webserver
 
Okay, so I'll admit it: I'm new to Linux. I tried running apache 1.3, but I had problems (coundn't access from outside of network); I installed apache 2.0, but that didn't help anything.
Hearing that some ISPs disallow port 80, I enabled port triggering on my wireless linksys router:

Application name: http
Trigger Port Range: 80-80
Incoming Port Range: 8000-8000

Port Forwarding: 80-80 192.168.1.51
Had this before I enabled port triggering

However, I was still unable to access my site outside the network (using either w.x.y.z:80 or w.x.y.z:8000)
Even within the network, w.x.y.z:80, w.x.y.z:8000, and 192.168.1.51:8000 didn't work. Only 192.168.1.51:80 worked.

Hearing that my router may not (for reasons unknown to me) be forwarding the external port 8000 from the client to the internal port 80 for my linux server, I tried setting the apache port to 8000 and just forwarding that.

httpd.conf
Code:

Listen 8000
ServerName 192.168.1.51:8000

No Port Triggering
Port Forwarding: 8000-8000 192.168.1.51


Using this, external users can access the site using w.x.y.z:8000

My question is this: Why can't I use the default port 80? If it's the ISP, I'd expect port triggering port 8000 to 80 to work (since it changes the port AFTER going through the ISP). That leads me to believe that the Linux box is not allowing port 80; however, users on the internal network can access the site through port 80: on top of that, when I type
iptables -nvL
it tells me says something along the lines of "ACCEPT -- *(in) *(out) 0.0.0.0/0(source) 0.0.0.0/0(destination) tcp dpt:80 flags:0x16/0x02"

Any help would be appreciated.

hasnain 07-08-2004 04:18 AM

Webserver problem
 
hello


well ur problem is still not cleared to me....wat exactly uwant to do

1. do u want your webpage to be accessable to out side your network mean to say worldwide....?

2. Or do u want your webserver to be accessable to your LAN

do tell me this

regards

BlueRaja 07-08-2004 03:57 PM

As I said, I can access the site INTERNALLY when I set it to port 80 (and forward port 80 to my machine), but not externally.
When I set it to port 8000 (and forward port 8000 to the machine), I can get it to work internally and externally; however, of course, then anyone who wants to access my site has to add :8000 to the end of the domain.
I thought that this meant that my ISP was blocking port 80. However, when I tell my linksys router to forward port 8000 to port 80 (and set up the server to use port 80), I can't access the site externally. If my understanding is correct, this couldn't be due to the ISP, because only the internal network sees it as using port 80, while the rest of the world sees port 8000. This leads me to believe either:
a. My Linux box is blocking port 80, for some reason (although I can still access the site on my internal network, so there would also have to be some sort of ip-address check)
or b. My router isn't forwarding one port to another correctly (although I don't know why it wouldn't; it's practically new, and I've never had any problems with it)
I was wondering if there's a way to tell which is happening, or if neither, then what's actually wrong.

MrMud 07-08-2004 04:20 PM

Try the following tool:

http://michael.toren.net/code/tcptraceroute/

I recommend useing that to tcptraceroute to your machine with both 8000 and 80, and compare the difference. If the trace to port 80 stops a few hops before 8000, you can be pretty sure that your ISP is blocking port 80.


All times are GMT -5. The time now is 01:35 AM.