DNS Troubleshooting in Linux



Some basic DNS troubleshooting in Linux.

  1. First collect the information which has created the problem by doing some investigation(such as logs, debug messages etc) .
  2. Prepare your tools which is required for your troubleshooting.
  3. Troubleshooting is nothing but considering so many issues that may cause the problem and working one by one to pin point the actual culprit which created the issue.
  4. once issue is pin-pointed you have to work on that issue with the tools/commands/logs all other resources and have to resolve it.

Coming to troubleshooting DNS aka named services, here are the steps how we can resolve the DNS related issue:

I will take one scenario “suppose my client is unable to resolve host-names to IP address”
 Step1:Check the DNS server is configured on Client end or not
 check in below file if name server is configured to proper DNS server or not
 

#vim /etc/resolv.confIf the client is configured with proper DNS server follow to next step
 Stpe2:Ping to DNS server ip address
 #ping serveripadd


Step3:So pinging is happening
 then there is a communication path between Server-client, so we have to check weather DNS server is running or not. Here nmap can be used to check what ports opened on server.
 #nmap serveripadd

 Example:
#nmap 125.22.73.23

 this command will give you output what are the services running/ports opened on remote server, if DNS server is running and working fine means you can see DNS port(53) in the list of opened ports.
 Step4:Now checking DNS server issue in deep

  • Checking under whom the DNS server is register and its properties .

 #whois example.com

  • Checking what server is used to resolve and some basic info.

 #nslookup www.example.com 

  • Checking who is resolving and what is resolving in details about DNS server.

 #dig www.example.com

Leave a Reply

Your email address will not be published. Required fields are marked *