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.
Hi, I just started running a webserver from my computer (apache 1.3 on Mandrake 9.1) and have run into a slight problem. Apache is running fine, but when I enter the IP of my network in a web browser, it can't find the server. I can access other websites fine, and I can access my own site if I enter the number 127.0.0.1, but I just can't access it by entering either the LAN IP or the WAN IP. I'll probably kick myself when I find out what the problem is, but if anyone has suggestions I'd appreciate it.
ServerName wasn't set to the right number, so I changed that and restarted Apache. No difference, though. And I doubt there's a problem with the firewall, since the only firewall is the one running on my router and it's set to leave port 80 open. But anyways, the output of iptables -nL is:
What machines are you testing the connection from? Are you trying with your lan IP from another lan machine? You probably will not be able to use your public IP from within your lan. To use your public IP from outside your lan you will need to forward port 80 on the router to port 80 the linux box.
You may also want to confirm that apache is not just listening on the loopback address. Post the output of:
netstat -nlp
I've been typing in my external IP on the machine that's running the server, and I know that doesn't work. I won't be able to tell if it's visible from a machine outside the network until I get a chance to try one at the library, but the last time I checked, it wasn't. I've had it working before, though, so I know that it's at least do-able. My output from netstat -nlp is as follows:
The only for sure thing if Apache is being blocked by your firewall settings is to port scan your web server see if port 80 is responding. Also, you can telnet or netcat to your servers IP addy but make sure to use port 80 then type HEAD / HTTP/1.0 if it connects to the server. If it doesn't respond its your firewall settings either its ipchains/iptables or your hosts.allow and hosts.deny has been modified differently. Your web server is running fine if you're able to connect to localhost most likely its the firewall blocking the server.
In your httpd.conf, look for "Listen" and "BindAddress" and see if they are set to localhost or 127.0.0.1. If they are, remove them.
You could also even try grepping for 127.0.0.1 in httpd.conf by typing:
# grep 127.0.0.1 httpd.conf
It's also possible that your ISP has started to block port 80. You can also try making apache listen on some obscure port like 7777 and then see if you can reach it by going to http://externalIP:7777
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.