Solved

can't dig local domains

Posted on 2004-03-30
4
481 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
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

U.S. Department of Agriculture and Acronis Access

With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
AWS - HAProxy- KeepAlived 5 43
is my large folder zipped corrupted 4 66
awk file 6 53
000webhost.com default error log 1 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 …
Google Drive is extremely cheap offsite storage, and it's even possible to get extra storage for free for two years.  You can use the free account 15GB, and if you have an Android device..when you install Google Drive for the first time it will give…
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

772 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