Feisty: How to enter DNS value

Seth Hasani sepheebear at gmail.com
Sat May 19 02:13:45 UTC 2007


On 5/11/07, H. S. Rai <hardeep.rai at gmail.com> wrote:
> On 5/9/07, Casey Stamper <casey.stamper at gmail.com> wrote:
>
> > Just put them in /etc/resolv.conf in the format:
> > nameserver           192.168.1.1
>
> Oh yes, thanks for ever green solution. I used this on Redhat and
> later I got impression that Debian use some different file (may be I
> wrong as I am feeling now) for DNS entry, so I never tried to check
> /etc/resolv.conf on Ubuntu.

IIRC if you are using DHCP /etc/resolv.conf gets recreated anew after
each boot. So if you want these settings to remain after reboots you
need to install the universe package resolvconf OR you can simply add
them to your DHCP config. Edit /etc/dhcp3/dhclient.conf and add a
prepend domain-name-servers xx.xx.xx.xx.

I use OpenDNS.com servers and dnsmasq for DNS so here is what my
config looks like:

    prepend domain-name-servers 127.0.0.1, 208.67.222.222, 208.67.220.220;

This adds them in front of your DHCP-acquired DNS entries.

-- 
Sex is not the original sin, guilt is.




More information about the ubuntu-users mailing list