TipOfTheDay

From TheBestLinux.com
Jump to navigationJump to search

Tip of the Day


  • October 23, 2021

All Filesystem Types Listed! New pages listing all filesystem types, not just Linux, but ALL 100 of the different filesystem types!
Filesystem Types



  • May 28, 2021

The Issue:

/etc/resolv.conf - Why do my DNS lookups not work, or sometimes seem to work, and other times don't.


Today's tip of the day is something I just figured out, after having it bug me for many years, and only just now confirming the resolution!

Unfortunately, Network Manager often creates a new /etc/resolv.conf file with the "search" statement preceding the "nameserver" statement(s)! This causes intermittent DNS lookup failures, especially on the local network! This has caused me years of frustration, so my hopes are this will help others avoid my past frustration! :-)

Here is an example of what Network Manager can create, causing my local DNS queries on my own internal BIND9 DNS VM servers to fail:

# Generated by NetworkManager
search dawgland.com
nameserver 192.168.200.103
nameserver 192.168.200.104
nameserver 4.2.2.4


Through trial and error using multiple machines(VM's actually) with multiple distros of Linux, both Red Hat and Debian based, I discovered that the order of the statements within the /etc/resolv.conf file make a HUGE differnce!

The Solution:
The nameserver statements MUST come before the "search" statement!!! Such as this example:

# /etc/resolv.conf - Created manually on 05-28-2021
nameserver 192.168.200.103
nameserver 192.168.200.104
nameserver 4.2.2.4
search dawgland.com


The changes take effect immediatelly, without the need to reboot or restart any services. I hope you found this tip of the day useful!