?
Solved

can't dig local domains

Posted on 2004-03-30
4
Medium Priority
?
509 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 80 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

Learn how to optimize MySQL for your business need

With the increasing importance of apps & networks in both business & personal interconnections, perfor. has become one of the key metrics of successful communication. This ebook is a hands-on business-case-driven guide to understanding MySQL query parameter tuning & database perf

Question has a verified solution.

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

I. Introduction There's an interesting discussion going on now in an Experts Exchange Group — Attachments with no extension (http://www.experts-exchange.com/discussions/210281/Attachments-with-no-extension.html). This reminded me of questions tha…
In part one, we reviewed the prerequisites required for installing SQL Server vNext. In this part we will explore how to install Microsoft's SQL Server on Ubuntu 16.04.
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial
Suggested Courses
Course of the Month11 days, 3 hours left to enroll

770 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