Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a Ubuntu server but there are some weird things I can't understand.

I cannot ping to the server via IP address, but I can ssh to it. I can access to apache server inside the server via command line, but I cannot acccess in my Windows's browser.

What kind of setting I need to check now?

share|improve this question
Check your iptables firewall rules, you might be blocking port 80/443, as well as ICMP ping, but allowing ssh. If you don't have a firewall running, it might be your routing table, but that doesn't explain everything. – jsbillings Mar 16 '13 at 12:35
One other possibility is that Apache isn't listening on the correct network interface, but that's highly unlikely if this is a new install. – depquid Mar 16 '13 at 17:08
@jsbillings, routing tables direct traffic at the IP level, if you can reach the machine at the IP level (via direct ssh) then you can reach it by ICMP (ping, ...) and HTTP/HTTPS unless something filters that out on the way (or at the destination). – vonbrand Mar 16 '13 at 22:13
Some cloud providers block ICMP (for example, Amazon Web Services does by default). – Olathe Mar 17 at 3:59

You can debug the issue using the following tools:

  1. Run wireshark or tcpdump and check whether the HTTP request is reaching to the server or not.

  2. Use tcptraceroute

    $ tcptraceroute "webserver-ip" 80

  3. It can be the case that the webserver is listening only on localhost( instead of listening on all interfaces(

    $ sudo netstat -taupen | grep LISTEN

  4. Check the iptables rules using

    $ sudo iptables -nvL

  5. Check the status of SELinux which also acts as firewall.

    $ sudo sestatus

share|improve this answer
  1. You might have firewall rules blocking access. Check the output of iptables -L. Maybe everything is blocked except ssh.

  2. The services might not be listening on the right interfaces or ports. Check the output of netstat -ntl.

If these commands don't help figuring it out, then please add their output in your question. Also add the output of ifconfig.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.