My server doesn’t receive responses from pings

Posted on

My server doesn’t receive responses from pings – Managing your servers can streamline the performance of your team by allowing them to complete complex tasks faster. Plus, it can enable them to detect problems early on before they get out of hand and compromise your business. As a result, the risk of experiencing operational setbacks is drastically lower.

But the only way to make the most of your server management is to perform it correctly. And to help you do so, this article will share nine tips on improving your server management and fix some problem about networking, debian, linux, ping, .

if I SSH into my server, and I try to ping another server, I never see the responses. This seems to happen only on urls. I’ve been able to ping a couple ip addresses.

I first noticed this problem when my PHP cURL requests were failing; I was seeing this error: “name lookup timed out”.

Also, I’m not sure if this is unusual, but I couldn’t locate nslookup or dig on my server. (doing which nslookup and which dig didn’t provide any results)

This problem seemed to coincide with a slice migration (Slicehost was migrating my slice).

Interestingly, I’m able to successfully ping my server from any other computer, and navigate to the webpages it hosts.

My server is: Debian 5.0 (lenny), and I’m running Apache if it makes any difference. I’m a bit of a SysAdmin noob, so please let me know if there’s any more info that would be helpful. Any assistance would be appreciated. Thank you!

Solution :

Newtang,

It sounds like your having DNS resolution issues. To confirm network connectivity you can ping Google’s DNS servers 8.8.8.8 or 8.8.4.4. If that works but pinging google.com returns name lookup timed out then it is likely a DNS issue.

/etc/resolv.conf should contain a list of resolvers that your box sends DNS queries. The list should include what your hosting provider recommends. I don’t use Slicehost so I can’t be certain but this wiki may be of help: http://wiki.slicehost.com/doku.php?id=using_slicehost_nameservers_for_dns_lookups

For testing purposes you can add Google’s nameservers to /etc/resolv.conf (at the beginning) and see if that resolves your issue.

e.g.

nameserver 8.8.8.8

EDIT:

If your /etc/resolv.conf looks good then make sure your firewall is not blocking DNS packets. If you’re using iptables you can view your rules by running ‘iptables -L’. DNS uses port 53 so you will need to make sure that there is a rule allowing the query to go out and another for the answer to return.

Example:

iptables -A OUTPUT -p udp -m udp --dport 53 -j ACCEPT
iptables -A OUTPUT -p tcp -m tcp --dport 53 -j ACCEPT
iptables -A INPUT -p udp -m udp --sport 53 -j ACCEPT
iptables -A INPUT -p tcp -m tcp --sport 53 -j ACCEPT

If it turns out not to be a local firewall issue, check with your hosting provider – I’ve heard of a couple of hosting providers that block outbound DNS queries and instead force their users to use their local caching nameservers. Generally a bad practice that doesn’t happen that often, but it’s possible. A quick check with your hosting provider should be enough to verify or eliminate this.

Leave a Reply

Your email address will not be published.