ubuntu 6.10: Problem with DNS configuration...
Peter Garrett
peter.garrett at optusnet.com.au
Fri Feb 16 12:38:23 UTC 2007
On Fri, 16 Feb 2007 10:12:09 +0100
Patrick Gelin <patrick.gelin at free.fr> wrote:
> I use the graphical interface or I write directly into /etc/resolv.conf, the
> problem is the same. When I reboot the PC, the DNS I write
> into /etc/resolv.conf is replaced by the address of the router and the
> adress of a DNS.
DHCP replaces /etc/resolv.conf each time it updates ( using dhclient,
which runs when Network Manager asks for an IP or when your interface
comes up.
One way to stop this happening is to make a
file /etc/dhcp3/dhclient-enter-hooks that looks like this:
( between the --------- lines )
---------------------------------------------------
#!/bin/bash
# Stop replacing /etc/resolv.conf !!
function make_resolv_conf {
echo “Doing nothing to resolv.conf”
}
---------------------------------------------------
Make that executable with sudo chmod +x and your /etc/resolv.conf will
not change again ;)
Be aware though, that if you do this you need to be *sure*, of course,
that you do not want it to change at all.
Peter
More information about the ubuntu-users
mailing list