Still Need to Edit Resolv.conf? Bug?

2 posts / 0 new
Last post
#1 Thu, 07/10/2014 - 17:08
MTUser2012

Still Need to Edit Resolv.conf? Bug?

I was taught that good practice in setting up Virtualmin was to add the following line to the top /etc/resolv.conf

echo nameserver 127.0.0.1 >> /etc/resolv.conf

Does this still apply? Is it good practice? I don't want to be like that story about the modern gunnery crew with two men standing on the left and right of a gun because they used to hold the horses.

Thu, 07/10/2014 - 18:52
Locutus

If I'm not mistaken the Virtualmin installer script should perform this step automatically.

If it does not for some reason, it is indeed recommended (and the configuration check will fail otherwise) to have 127.0.0.1 as first nameserver in resolv.conf. (Your example with echo >> would probably add it as last nameserver, which is incorrect.)

Note that depending on Linux distro and version, the nameservers need to be configured in the network config file (e.g. /etc/network/interfaces in Ubuntu), since resolv.conf gets overwritten/auto-generated by the system.

Topic locked