-1

I have a server that holds my server services. I'm able to ssh to the server:

ssh root@example.com
enter password:
root@example:#

But, I can't ping the server:

$ ping example.com

PING example.com (1.2.3.14):56 data bytes    
Request timeout for icmp_seq 0

When I try to use the DNS I set up on the system.

$ nslookup hello.example.com example.com
;; connection timed out; no servers could be reached

but when i do a ns lookup with the different server.

$ nslookup hello.example.com

Server:     192.168.1.1
Address:    192.168.1.1#53

Non-authoritative answer:
Name:   hello.example.com
Address: 192.168.1.10

I'm not sure what is going on. Is it because I can't ping my server that the DNS fails? I need to fix this, but can't seem to find a way.

Let me know if you would more information to solve this, I will be happy to provide you with it.

slm
  • 7,355
  • 16
  • 54
  • 72
Vijit Jain
  • 86
  • 3
  • 15
  • it is obvious that i have changed the name and IP address. so ignore the irregularities in them – Vijit Jain Aug 07 '13 at 19:52
  • 1
    What does `iptables -L -v -n ` say ? – user9517 Aug 07 '13 at 19:59
  • Unless you purposely changed the IP in the ping output (or you're trying to ping an external IP), it is trying to ping the incorrect IP. You say you cannot ping, but can you ping the IP and not by DNS name instead? What is the output when you ssh in and ping example.com from within the SSH session on that server? – TheCleaner Aug 07 '13 at 20:06

1 Answers1

0

I would start with looking at iptables for an unwanted firewall rule.
Ping and DNS are different protocols (and neither implicitly relies on the other). Ping can be disabled by blocking/ignoring ICMP requests and isn't really indicative of a problem (try pinging microsoft.com).
DNS uses TCP 53 and UDP 53.

saltface
  • 415
  • 5
  • 17
  • Firewall does not block DNS port 53 UDP/tcp I found the error. It was with my router. I had to point the Bind IP on my router to get this to work. – Vijit Jain Aug 07 '13 at 20:14
  • I have to change the setting on my apple router to make this to work. All i did was point the bind service from my router to the DNS server, and it fixed the problem. Ping is still blocked by the router. that is not a concern any more – Vijit Jain Aug 07 '13 at 20:18
  • 2
    @VijitJain Glad you resolved this. Please be sure to post your findings as an answer and [mark your answer as accepted](http://meta.stackexchange.com/questions/5234/how-does-accepting-an-answer-work) – jscott Aug 07 '13 at 20:18