Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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?
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".
Distribution: OpenBSD 4.6, OS X 10.6.2, CentOS 4 & 5
Posts: 3,660
Rep:
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.
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.