[olug] Testing contents of resolv.conf

Rob Townley rob.townley at gmail.com
Fri Aug 23 21:04:49 UTC 2013


Dave,

i do not remember offhand the better ways to test this, but i do
encourage it.  Even more so, if using IPv6.

Very wise to test this as i have not always found /etc/hosts to be
queried first like i would expect
especially with the host command.   host often bypasses entries in my
/etc/hosts file, but ping works.

host is behaving as if dns is queried first, not files, but
nsswitch.conf has files first.
/etc/nsswitch.conf
hosts:      files dns

i did have a massive problem with the selinux settings of /etc/hosts,
but restorecon fixed that.

man host.conf has some interesting options i have tried with success,
but i am sure you already know all that.



On Thu, Aug 22, 2013 at 4:43 PM, Dave Thacker <dthacker at bluestrain.net> wrote:
> Scenario:
>
> The corporate mothership hath decreed that a new IP address be added to
> /etc/resolv.conf on all linux devices, including some IVR appliances in my
> realm.  (CentOS  and Red Hat)  The new address points to a snazzy new DNS
> appliance.
>
> The Name Service Caching Daemon (nscd) is not in use, these boxes do not run
> any SMTP.  The primary application has the addresses it needs in /etc/hosts.
> My google-fu has failed me on finding a suitable way to see if this second ip
> address would be used in a DNS lookup.   Anybody got a command line I could
> run and pull a return from?
>
> Dave
>
>
>
> _______________________________________________
> OLUG mailing list
> OLUG at olug.org
> https://lists.olug.org/mailman/listinfo/olug


More information about the OLUG mailing list