ATTENTION: You are viewing a page formatted for mobile devices; to view the full web page, click HERE.

Main Area and Open Discussion > General Software Discussion

Any way to make ubuntu server dns changes permanent?

(1/1)

nite_monkey:
I have a computer setup running ubuntu server 12.04, with a static ip, and every time I reboot it, it loses it's ability to do dns lookups. The only way I can fix this is by changing the etc/resolv.conf file and adding custom dns servers to it. Though as stated earlier, upon reboot, this file reverts to default, and my server can no longer do dns lookups. I've googled, and found one fix that said to do some chattr command, but that just gives me the error "chattr: Operation not supported while reading flags on resolv.conf". There was also another fix that said to add the dns servers to a file in the folder etc/dhcp3. The problem with that fix is, that folder doesn't even exist. Is there some place else that I can add custom dns servers that will persist between reboots.

Exact commands would be very helpful, because I am still a linux newb, and am still learning the terminal.

ewemoa:
Perhaps the following might work for you:

  http://askubuntu.com/questions/27358/dns-server-configuration-is-changed-automatically/46134#46134

nite_monkey:
I actually found a different fix that works. I needed to add the dns servers to the etc/network/interfaces file, and that seems to update the resolv.conf file everytime I reboot the server.

ewemoa:
Cool that you have a fix that doesn't require another package :)

nite_monkey:
Cool that you have a fix that doesn't require another package :)
-ewemoa (July 05, 2012, 02:31 AM)
--- End quote ---
kind of a good thing too, because I can't find that package on my server. (trying to type apt-get install says it can't find it, and it isn't installed either.)

Navigation

[0] Message Index

Go to full version