Advanced

Pro tip: Take back control of resolv.conf

Posted by bob on · 5 comments
techrepublic; By Jack Wallen
Mail this story
Print this story

Long ago, you could setup a Linux box and edit the /etc/resolv.conf file knowing the changes would stick. That made it incredibly simple to manage what DNS servers would be used by the machine. Fast-forward to now, and a manual edit of that same file will only be overwritten anytime you restart networking or reboot the machine.

Full Story

  Nav
» Read more about: Story Type: Tutorial

» Get new stories by e-mail: nightly or as they are published

« Return to the newswire homepage

  Related stories
» More like this

Comments (5)

If you're tired to play hide-and-seek with your configuration files, just use Slackware. A distribution that doesn't follow every stupid new trend.
Agreed. In fact, I'm pretty sure the default configuration of dnsmasq with Slackware doesn't overwrite the resolv.conf file, but instead uses it to determine what nameservers to pass to the machines requesting ip addresses.

Now, if you use wicked or network manager, that's another matter.
Learning to use dnsmasq is a better solution. It was putting the localhost address in resolve.conf so dnsmasq would act as a dns cache. Just put the wanted DNS server addresses in dnsmasq.conf, or uninstall it completely if you aren't going to make use of it. It doesn't even make sense to blame dnsmasq when most distributions have a network manager that automatically put DNS numbers for connections served via DHCP in resolv.conf.

Jack is a rube.
Here's everything you want to know about Dnsmasq configuration under Slackware.

https://kikinovak.wordpress.com/2015/04/24/mettre-en-place-u...
> Here's everything you want to know about Dnsmasq configuration under Slackware.

I think I had to change all of five lines in the configuration file to get things working, The only one that took any effort was telling dnsmasq that the machine it was running on wasn't the gateway. The rest were obvious given the configuration comments in the file.

Post a comment

A free account is needed to post. Write your comment here first: your text is kept in this browser while you sign up or log in, and is waiting for you when you come back.

Your message:
|||||
10
Markdown: **bold**, *italic*, [text](https://link), - lists, > quotes, $x^2$ for math. Formatting help

Sign up and post (it is free)  or  Log in and post