127.0.0.1 keeps disappearing from DNS Servers

9 posts / 0 new
Last post
#1 Sat, 05/16/2009 - 22:17
mrwilder

127.0.0.1 keeps disappearing from DNS Servers

In the "Hostname and DNS Client" screen, In the section marked "DNS servers", I'm trying to add "127.0.0.1" as the third server. I keep hitting save, but after I "apply configuration" it disappears.

What's up with that?

Sat, 05/16/2009 - 22:53
Joe
Joe's picture

I had a similar problem on a system that was configured to get its DNS information from DHCP. I think I gave up on having DNS service on that machine (it's a lappy...obviously not going to be doing actual web hosting on it).

I think there's a way to add other servers to the configured ones in the DHCP client configuration, but it's been a long time since I've dealt with that. There's a Webmin module for the DHCP client which might make this easy. I dunno. ;-)

I'll wait to dig further until I actually know DHCP is the problem you're dealing with.

--

Check out the forum guidelines!

Sun, 05/17/2009 - 01:35 (Reply to #2)
ronald
ronald's picture

isn't the solution to not hit "apply configuration"?
I thought I read this once.

Sun, 05/17/2009 - 10:13 (Reply to #3)
Joe
Joe's picture

Oh, right! There's also that.

Hitting "apply configuration" does a "service network restart" or similar, which would obviously overwrite the DNS configuration if you're pulling from DHCP.

The resolv.conf file needs no "apply" step to go into effect. It is queried everytime a name is looked up.

But, that doesn't permanently fix the problem, if DHCP is the cause. Every time the system is rebooted, or the network settings change, it would lose the 127.0.0.1 entry.

--

Check out the forum guidelines!

Sun, 05/17/2009 - 14:16 (Reply to #4)
mrwilder

This server isn't getting it's configuration from a DHCP server, and yes, after I reread that not un-negative comment a few times, it finally made sense:

The solution IS to NOT hit "apply configuration".

Thanks!
Tony

Sun, 01/29/2012 - 07:04
rulez22

not only that... It should be hard written in etc/resolv.conf as:

nameserver 111.111.111.111 nameserver 127.0.0.1

and make sure your daemon "NetworkManager" does NOT start automatically with every system boot, it wipes off all these settings.

Tue, 01/31/2012 - 07:25
helpmin

Even if you don't use DCP and if the VPS is OpenVZ based you will always see this problem and it is probably best to talk to your provider.

Topic locked