topbanner_forum
  *

avatar image

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

Login with username, password and session length
  • Thursday March 28, 2024, 4:22 am
  • Proudly celebrating 15+ 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 7926 times)

nite_monkey

  • Member
  • Joined in 2006
  • **
  • Posts: 753
    • View Profile
    • Just Plain Super
    • Read more about this member.
    • Donate to Member
Any way to make ubuntu server dns changes permanent?
« on: July 05, 2012, 12:02 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,922
    • View Profile
    • Donate to Member
Re: Any way to make ubuntu server dns changes permanent?
« Reply #1 on: July 05, 2012, 12:20 AM »
Perhaps the following might work for you:

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

nite_monkey

  • Member
  • Joined in 2006
  • **
  • Posts: 753
    • View Profile
    • Just Plain Super
    • Read more about this member.
    • Donate to Member
Re: Any way to make ubuntu server dns changes permanent?
« Reply #2 on: July 05, 2012, 01:57 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,922
    • View Profile
    • Donate to Member
Re: Any way to make ubuntu server dns changes permanent?
« Reply #3 on: July 05, 2012, 02:31 AM »
Cool that you have a fix that doesn't require another package :)

nite_monkey

  • Member
  • Joined in 2006
  • **
  • Posts: 753
    • View Profile
    • Just Plain Super
    • Read more about this member.
    • Donate to Member
Re: Any way to make ubuntu server dns changes permanent?
« Reply #4 on: July 05, 2012, 04:32 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]