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 have a server that I can ping, and I can connect remotely with ssh to it. But when I try to connect to apache (port 80) I get "no route to host". But I can connect to localhost
It's not just my client system that is having this problem but also systems that are on the same subnet
There is no firewall running on the server
route on the server
Code:
# route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.99.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
169.254.0.0 0.0.0.0 255.255.0.0 U 0 0 0 eth0
0.0.0.0 192.168.99.2 0.0.0.0 UG 0 0 0 eth0
$ ping 192.168.99.25
PING 192.168.99.25 (192.168.99.25) 56(84) bytes of data.
64 bytes from 192.168.99.25: icmp_seq=1 ttl=63 time=0.586 ms
64 bytes from 192.168.99.25: icmp_seq=2 ttl=63 time=0.369 ms
64 bytes from 192.168.99.25: icmp_seq=3 ttl=63 time=0.381 ms
64 bytes from 192.168.99.25: icmp_seq=4 ttl=63 time=0.402 ms
^C
--- 192.168.99.25 ping statistics ---
4 packets transmitted, 4 received, 0% packet loss, time 3011ms
rtt min/avg/max/mdev = 0.369/0.434/0.586/0.090 ms
Traceroute to server
Code:
$ traceroute 192.168.99.25
traceroute to 192.168.99.25 (192.168.99.25), 30 hops max, 40 byte packets
1 192.168.31.1 (192.168.31.1) 0.684 ms 0.944 ms 1.416 ms
2 syslog.99.168.192.in-addr.arpa (192.168.99.25) 0.390 ms !X 0.291 ms !X 0.253 ms !X
When you say you are trying to connect to apache service on the server. Are you trying to telnet that server on port 80?
Check if apache service is running on that server.
service httpd status
If showing as stopped start it:
service httpd start
If running on Debian or any of its derivatives then instead of service httpd status use service apache2 status
Because you can connect to it using SSH and ping it so nothing wrong with the network. Not sure but even if the firewall is on you should get a reply saying connection refused.
Last edited by T3RM1NVT0R; 05-09-2011 at 12:32 PM.
1. You are able to connect to the server using SSH locally as well as remotely.
2. You are able to telnet server on port 80 locally but when you try to telnet your server on port 80 remotely you get no route to host.
3. No firewall running on the server.
Here are the things that I would like to know:
1. Is there any firewall running between remote machines and server blocking port 80?
2. Are you able to browse the default apache home page from remote machines?
3. How you are trying to telnet via host name or via IP
4. Output of /etc/apache2/apache2.conf
5. How name resolution is configured.
6. When you say you can connect to localhost what does that mean?
1. You are able to connect to the server using SSH locally as well as remotely.
2. You are able to telnet server on port 80 locally but when you try to telnet your server on port 80 remotely you get no route to host.
3. No firewall running on the server.
Here are the things that I would like to know:
1. Is there any firewall running between remote machines and server blocking port 80?
2. Are you able to browse the default apache home page from remote machines?
3. How you are trying to telnet via host name or via IP
4. Output of /etc/apache2/apache2.conf
5. How name resolution is configured.
6. When you say you can connect to localhost what does that mean?
1: There is no firewall or ACL between my client pc and the Server
2: No I can't browse the default apache page from a remote system
Let's take a look at what the traffic is doing you send to the server. Run this command on your server (as root):
Code:
tcpdump -nni ethX port 80
The 'ethX' needing to be changed to the NIC you use on the server, such as eth0, eth1, etc, etc.
That will show you if the traffic is indeed getting there, which from what you have shown insofar as your network config goes, it should be. If you see traffic only coming in to the server from the client system, and not being answered, well, you probably some some sort of a config problem on Apache. I'm guessing that the traffic is getting there, it just isn't responding.
Hi, I had this same exact problem, but in Fedora 18, I finally managed to fix it by open the firewall dialog (Applications -> Other -> Firewall) , select "Persistent Configuration" and then proceeded to mark the "http" service as trusted on all zones.
Hope this can be useful to someone with the same problem.
This might be too late reply, but thought it would help someone in the future. I had similar issue with CentOS 6, found out the repo server had OS firewall turned on. After turning off iptables, client machine was able to hit the repository.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.