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, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content