Solved

can't dig local domains

Posted on 2004-03-30
4
497 Views
Last Modified: 2010-04-20
I can't seem to dig, or do any kind of dns queries on local domains.  If I'm in bash and I say dig domain.com I get:
; <<>> DiG 9.2.1 <<>> domain.com
;; global options:  printcmd
;; connection timed out; no servers could be reached

However, if I do it from a different machine I get the right responce.  I'm not sure what chaned, but I did mess with my /etc/hosts file a while ago.  Any help?
-ben
0
Comment
Question by:esromneb
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
4 Comments
 
LVL 11

Expert Comment

by:lbertacco
ID: 10721940
Make sure you have specified a DNS server for the local domains in /etc/resolv.conf e.g.
Then make sure you can actually reach that server (ping it)

0
 
LVL 20

Expert Comment

by:Gns
ID: 10722493
Also check that you allow dns from local to local (so to speak:-) ... in your local firewall (if any).

-- Glenn
0
 
LVL 2

Accepted Solution

by:
tcmv earned 20 total points
ID: 10725070
Your /etc/resolv.conf should have entries like this, with at least one nameserver directive pointing to an IP address.  

nameserver 192.168.1.1
nameserver ns1.domain.com

If it points to a dns name only, how will it be able to resolve it to talk to the dns server to resolve other names, unless you specified it in the /etc hosts file?

/etc/hosts could look like this:
192.168.1.2     ns1.domain.com

You could use nmap to make sure your box can talk to the dns server like this:

nmap -v -sU -p53 ns1.domain.com  -- this one for UDP
nmap -v -p53 ns1.domain.com        -- this one for TCP

If it can't talk to that dns server, then look into firewall policies and routing policies  (locally on your linux box ... iptables, /sbin/route )


Hope that helps,
-tcmv
www.mvix.net
0
 

Author Comment

by:esromneb
ID: 10728057
I acually got it to work with an odd configuration of my /etc/hosts file, but I think my hosts file is right the way it is now.  I took tcmv's advice and chaned my /etc/resolf.conf file to:
nameserver 127.0.0.1
nameserver x.x.x.x

(that way it will check the local machine first, dns caching or something)  And now it works.  Thanks.
-ben
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
AWS EC2 HTTP & HTTPS 2 115
Install XRDP on Ubuntu Server 16.10 x64 3 116
VMware machine is not booting 6 122
grep command usage 10 28
Network Interface Card (NIC) bonding, also known as link aggregation, NIC teaming and trunking, is an important concept to understand and implement in any environment where high availability is of concern. Using this feature, a server administrator …
In the first part of this tutorial we will cover the prerequisites for installing SQL Server vNext on Linux.
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
Suggested Courses

732 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question