How to configure nslookup/dig to resolve hostnames mentioned in /etc/hosts?

Solution Verified - Updated -

Issue

  • How to configure nslookup/dig to resolve hostnames mentioned in /etc/hosts?

  • DNS Server is hosted on the outside network. Internal DNS Server is hosted using BIND within the network to resolve the internal clients. Clients can resolve the Outer DNS when gave a outside nameserver, but cant resolve internal DNS Client. When internal clients are configured to use Internal DNS Server, they cant resolve outer subdomains. For example:

    • example.com hosted on outer network giving resolving for www.example.com & mail.example.com
    • host1.example.com & host2.example.com are hosted within the internal network.

Environment

  • Red Hat Enterprise Linux 5
  • Red Hat Enterprise Linux 6
  • BIND
  • DNSMASQ

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In
Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.