Home | Blog | Software | Reviews and Features | Forum | Help | Donate | About us
topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • May 25, 2016, 11:45:46 PM
  • Proudly celebrating 10 years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Author Topic: Any way to make ubuntu server dns changes permanent?  (Read 4779 times)

nite_monkey

  • Member
  • Joined in 2006
  • **
  • Posts: 723
    • View Profile
    • Just Plain Super
    • Donate to Member
Any way to make ubuntu server dns changes permanent?
« on: July 05, 2012, 12:02:04 AM »
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.
[Insert really cool signature here]

ewemoa

  • Honorary Member
  • Joined in 2008
  • **
  • Posts: 2,841
    • View Profile
    • Donate to Member
Re: Any way to make ubuntu server dns changes permanent?
« Reply #1 on: July 05, 2012, 12:20:07 AM »
Perhaps the following might work for you:

  http://askubuntu.com...atically/46134#46134

nite_monkey

  • Member
  • Joined in 2006
  • **
  • Posts: 723
    • View Profile
    • Just Plain Super
    • Donate to Member
Re: Any way to make ubuntu server dns changes permanent?
« Reply #2 on: July 05, 2012, 01:57:26 AM »
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.
[Insert really cool signature here]

ewemoa

  • Honorary Member
  • Joined in 2008
  • **
  • Posts: 2,841
    • View Profile
    • Donate to Member
Re: Any way to make ubuntu server dns changes permanent?
« Reply #3 on: July 05, 2012, 02:31:14 AM »
Cool that you have a fix that doesn't require another package :)

nite_monkey

  • Member
  • Joined in 2006
  • **
  • Posts: 723
    • View Profile
    • Just Plain Super
    • Donate to Member
Re: Any way to make ubuntu server dns changes permanent?
« Reply #4 on: July 05, 2012, 04:32:43 AM »
Cool that you have a fix that doesn't require another package :)
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.)
[Insert really cool signature here]