View Single Post
  #1   (View Single Post)  
Old 6th November 2010
guitarscn guitarscn is offline
Package Pilot
 
Join Date: Oct 2008
Posts: 166
Default How to add a nameserver in /etc/resolv.conf automatically

Okay, so it seems every time I reboot (or maybe every time I connect to the internet) it seems /etc/resolv.conf gets reset and everything I added before is gone. How can I make it so that it can change itself dynamically as needed, but always keep one line in there? I want to keep "nameserver 127.0.0.1" on top, right after the 'search' line which is the very 1st line in the file. So for example I want it like:

Code:
search blah
nameserver 127.0.0.1
nameserver 192.168.1.1
nameserver 55.55.55.55
Where "nameserver 192.168.1.1" and "nameserver 55.55.55.55" might change accordingly by itself at any point, but I'd like "nameserver 127.0.0.1" to always be there first all the time. Is this possible?
Reply With Quote