LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 10-25-2003, 09:27 PM   #1
slackwarefan
Member
 
Registered: Oct 2003
Location: Florida
Distribution: Slackware
Posts: 273

Rep: Reputation: 30
Cant connect on port 80


Hello

I can connect to my local machine from my local machine, but when others try to connect from their computers, they get a timeout error on http. I am running apache, and I checked the logs but they dont report any attemped access. Why does this happen and how do I fix it?
 
Old 10-25-2003, 11:05 PM   #2
Blindsight
Member
 
Registered: Mar 2003
Distribution: Slackware
Posts: 234

Rep: Reputation: 30
You shouldn't have any firewall rules, but let's check anyway.

`iptables -L -n` ... Paste your output unless it's empty. It should just say INPUT, OUTPUT, and FORWARD with nothing listed under it.

Secondly, how do you connect to the internet? Dialup? Cable? If you have a cable modem, it's likely that your cable modem things people are trying to connect to it from the outside, so you have to forward port 80 from your cable modem to your linux box.

Next, `netstat -an | grep 80`. What interfaces are listening on port 80 on your machine? It should be listening on either 0.0.0.0:80 or 127.0.0.1:80 AND <ethx ip>:80 . If that isn't the case, go to your httpd.conf and make sure your "Listen" directive just says "Listen 80" instead of "Listen 127.0.0.1:80".

Hope this helps, post your results.
 
Old 10-25-2003, 11:07 PM   #3
aeruzcar
Member
 
Registered: Jul 2003
Location: Santiago, Chile
Distribution: Gentoo
Posts: 282

Rep: Reputation: 30
Doy you have a modem or a router connected to your computer?, if so, make sure that you have forwarded the port to your computer.
 
Old 10-25-2003, 11:53 PM   #4
slackwarefan
Member
 
Registered: Oct 2003
Location: Florida
Distribution: Slackware
Posts: 273

Original Poster
Rep: Reputation: 30
port 80

output of iptables:

Chain INPUT (policy ACCEPT)
target prot opt source destination

Chain FORWARD (policy ACCEPT)
target prot opt source destination

Chain OUTPUT (policy ACCEPT)
target prot opt source destination

Also, if I am using a cable modem. how do I foreward port 80 to my linux box, and why does it already do this with other ports? It is an RCA modem.

Here is the output of netstat

netstat -an | grep 80
unix 2 [ ACC ] STREAM LISTENING 1040 /tmp/.ICE-unix/dcop980-
1067143319
unix 3 [ ] STREAM CONNECTED 1726 /tmp/.ICE-unix/dcop980-
1067143319
unix 3 [ ] STREAM CONNECTED 1723 /tmp/.ICE-unix/dcop980-
1067143319
unix 3 [ ] STREAM CONNECTED 1716 /tmp/.ICE-unix/dcop980-
1067143319
unix 3 [ ] STREAM CONNECTED 1712 /tmp/.ICE-unix/dcop980-
1067143319
unix 3 [ ] STREAM CONNECTED 1700 /tmp/.ICE-unix/dcop980-
1067143319
unix 3 [ ] STREAM CONNECTED 1678 /tmp/.ICE-unix/dcop980-
1067143319
unix 3 [ ] STREAM CONNECTED 1675 /tmp/.ICE-unix/dcop980-
1067143319
unix 3 [ ] STREAM CONNECTED 1662 /tmp/.ICE-unix/dcop980-
1067143319
unix 3 [ ] STREAM CONNECTED 1657 /tmp/.ICE-unix/dcop980-
1067143319
unix 3 [ ] STREAM CONNECTED 1645 /tmp/.ICE-unix/dcop980-
1067143319
unix 3 [ ] STREAM CONNECTED 1639 /tmp/.ICE-unix/dcop980-
1067143319
unix 3 [ ] STREAM CONNECTED 1613 /tmp/.ICE-unix/dcop980-
1067143319
unix 3 [ ] STREAM CONNECTED 1563 /tmp/.ICE-unix/dcop980-
1067143319
unix 3 [ ] STREAM CONNECTED 1483 /tmp/.ICE-unix/dcop980-
1067143319
unix 3 [ ] STREAM CONNECTED 1470 /tmp/.ICE-unix/dcop980-
1067143319
unix 3 [ ] STREAM CONNECTED 1449 /tmp/.ICE-unix/dcop980-
1067143319
unix 3 [ ] STREAM CONNECTED 1444 /tmp/.ICE-unix/dcop980-
1067143319
unix 3 [ ] STREAM CONNECTED 1438 /tmp/.ICE-unix/dcop980-
1067143319
unix 3 [ ] STREAM CONNECTED 1428 /tmp/.ICE-unix/dcop980-
1067143319
unix 3 [ ] STREAM CONNECTED 1418 /tmp/.ICE-unix/dcop980-
1067143319
unix 3 [ ] STREAM CONNECTED 1410 /tmp/.ICE-unix/dcop980-
1067143319
unix 3 [ ] STREAM CONNECTED 1387 /tmp/.ICE-unix/dcop980-
1067143319
unix 3 [ ] STREAM CONNECTED 1384 /tmp/.ICE-unix/dcop980-
1067143319
unix 3 [ ] STREAM CONNECTED 1366 /tmp/.ICE-unix/dcop980-
1067143319
unix 3 [ ] STREAM CONNECTED 1345 /tmp/.ICE-unix/dcop980- 1067143319
unix 3 [ ] STREAM CONNECTED 1339 /tmp/.ICE-unix/dcop980- 1067143319
unix 3 [ ] STREAM CONNECTED 1294 /tmp/.ICE-unix/dcop980- 1067143319
unix 3 [ ] STREAM CONNECTED 1290 /tmp/.ICE-unix/dcop980- 1067143319
unix 3 [ ] STREAM CONNECTED 1274 /tmp/.ICE-unix/dcop980- 1067143319
unix 3 [ ] STREAM CONNECTED 1230 /tmp/.ICE-unix/dcop980- 1067143319
unix 3 [ ] STREAM CONNECTED 1207 /tmp/.ICE-unix/dcop980- 1067143319
unix 3 [ ] STREAM CONNECTED 1199 /tmp/.ICE-unix/dcop980- 1067143319
unix 3 [ ] STREAM CONNECTED 1185 /tmp/.ICE-unix/dcop980- 1067143319
unix 3 [ ] STREAM CONNECTED 1154 /tmp/.ICE-unix/dcop980- 1067143319
unix 3 [ ] STREAM CONNECTED 1075 /tmp/.ICE-unix/dcop980- 1067143319
unix 3 [ ] STREAM CONNECTED 1060 /tmp/.ICE-unix/dcop980- 1067143319
 
Old 10-26-2003, 01:49 AM   #5
chort
Senior Member
 
Registered: Jul 2003
Location: Silicon Valley, USA
Distribution: OpenBSD 4.6, OS X 10.6.2, CentOS 4 & 5
Posts: 3,660

Rep: Reputation: 76
Well it could be several problems. As mentioned above, there might be a firewall in the way (nope), or your http server might not be bound to (listening on) the Internet interface. The output above shows only UNIX sockets, so that's possible. To clean up the output a little use netstat -anA inet. Just paste all the output of that command (no grep).

Now if you connect to the Internet via a cable modem, it's quite possible that your ISP is actually blocking inbound HTTP requests. You mentioned that your friends are getting time-out errors, which means somewhere a firewall is silently dropping packets. If it was your computer not listening on the right port they would get a connection refused instead of time-out.

You are probably going to end up needing to use a non-standard port for your HTTP server, which will make the normal method of connecting to it not work (well, it doesn't work now any way, so no big loss). You could use a "web-hop" service to redirect all HTTP requests at your site to your custom port. I know that dyndns.org offers such a service.
 
Old 10-26-2003, 03:31 AM   #6
Blindsight
Member
 
Registered: Mar 2003
Distribution: Slackware
Posts: 234

Rep: Reputation: 30
Excellent post by chort.

I'm not a GUI guy, so netstat -an doesn't give me a buttload of UNIX sockets, so I suggest it to people as habit cause I do it myself. chort had a better method. Try that first, to clean up your output and see if you have a http service running.

To forward ports from your cable modem, most modems have an admin console or http access. Read the man on your modem to find out how to access it and how to forward ports from it. If you don't have the printed documentation, in most cases Google can provide it for you.

To find out for sure if your ISP is filtering out inbound port 80 requests to their clients, it's best to call them and ask. Some ISPs find this an efficient way of blocking www servers running off their pipe (why?). chort offers an effective way of getting around that.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Cannot connect to port 25 from other machine... jdavidow Linux - Software 2 09-02-2004 05:27 AM
Can't Connect to port 25 diegofalciola Linux - Networking 18 12-06-2003 03:04 PM
can connect to port 25 zonelight Linux - Software 1 09-16-2003 04:12 AM
How to connect to a switch via COM port ? CRego3D Linux - Networking 2 06-12-2003 01:11 PM
apache - cant connect. port already in use... gene_gEnie Linux - Networking 13 04-17-2002 07:59 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

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

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration