Re: Prevent DHCP from changing resolv.conf

2005-04-22 Thread Joerg Pulz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
On Fri, 22 Apr 2005, Fabian Anklam wrote:
Hi All,
I have a minor problem regarding my network configuration,
specifically that the external interface on my router gets it's IP via
DHCP from the ISP, so in rc.conf
ifconfig_xl0=DHCP
is set. This leads to the single entry in resolv.conf that I want to
be there, namely
nameserver 127.0.0.1
being replaced with my ISP's nameservers, which in return makes
resolving of LAN IPs or even localhost via the installed BIND
difficult for the machine. I don't want dhclient to change the
resolv.conf.
I checked the man pages for resolv.conf, rc.conf and dhclient but
couldn't find anything there relating to my problem.
Hi,
the file you need to modify is /etc/dhclient.conf.
for parameters see dhclient.conf(5)
normally this file is empty, but you can insert global or per interface 
require lines for informations the DHCP server has to submit to the client 
that the IP is acceptable. you can also insert global or per interface 
lines for informations you want to get from the DHCP server if available 
but you don't care if the DHCP server gives you nothing on these 
options and the IP address is accepted.

hope that helps
joerg
- -- 
The beginning is the most important part of the work.
-Plato
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.0 (FreeBSD)

iD8DBQFCaMs2SPOsGF+KA+MRAqq4AJ95xhwr4lCKylNi1R2mfBgvtHMkoQCgojT1
SefND9ihSVSrSCKq+0n6wFs=
=3VLp
-END PGP SIGNATURE-
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Prevent DHCP from changing resolv.conf

2005-04-22 Thread Fabian Anklam
On 4/22/05, Joerg Pulz [EMAIL PROTECTED] wrote:
 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1
 
 On Fri, 22 Apr 2005, Fabian Anklam wrote:
 
  Hi All,
 
  I have a minor problem regarding my network configuration,
  specifically that the external interface on my router gets it's IP via
  DHCP from the ISP, so in rc.conf
 
  ifconfig_xl0=DHCP
 
  is set. This leads to the single entry in resolv.conf that I want to
  be there, namely
 
  nameserver 127.0.0.1
 
  being replaced with my ISP's nameservers, which in return makes
  resolving of LAN IPs or even localhost via the installed BIND
  difficult for the machine. I don't want dhclient to change the
  resolv.conf.
 
  I checked the man pages for resolv.conf, rc.conf and dhclient but
  couldn't find anything there relating to my problem.
 
 Hi,
 
 the file you need to modify is /etc/dhclient.conf.
 for parameters see dhclient.conf(5)
 
 normally this file is empty, but you can insert global or per interface
 require lines for informations the DHCP server has to submit to the client
 that the IP is acceptable. you can also insert global or per interface
 lines for informations you want to get from the DHCP server if available
 but you don't care if the DHCP server gives you nothing on these
 options and the IP address is accepted.
 
 hope that helps
 joerg
 
It does! Looks like i haven't read carefully enough. A

prepend domain-name-servers 127.0.0.1
or
supersede domain-name-servers 127.0.0.1

in dhclient.conf should be all that's needed. I'll test once I am back at home.

Many Thanks,
Fabian
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Prevent DHCP from changing resolv.conf

2005-04-22 Thread Luke Dean

I have a minor problem regarding my network configuration,
specifically that the external interface on my router gets it's IP via
DHCP from the ISP, so in rc.conf
ifconfig_xl0=DHCP
is set. This leads to the single entry in resolv.conf that I want to
be there, namely
nameserver 127.0.0.1
being replaced with my ISP's nameservers, which in return makes
resolving of LAN IPs or even localhost via the installed BIND
difficult for the machine. I don't want dhclient to change the
resolv.conf.
I checked the man pages for resolv.conf, rc.conf and dhclient but
couldn't find anything there relating to my problem.
Thanks, Fabian
In dhclient.conf, put:
prepend domain-name-servers 127.0.0.1;
This keeps the DNS that DHCP gives you, but it puts your local one first 
so you'll be able to find your local domains.

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


RE: Prevent DHCP from changing resolv.conf

2005-04-22 Thread Timothy Radigan
Or, if you don't feel like editing your dhclient.conf, in your
/etc/resolv.conf the first line usually reads:

search thisdomain.com
nameserver xxx.xxx.xxx.xxx
nameserver xxx.xxx.xxx.yyy

If you change the first line to read:

domain thisdomain.com
nameserver xxx.xxx.xxx.xxx
nameserver xxx.xxx.xxx.yyy

If you change the word search to domain, when the link comes up, dhclient
will not search for upstream domain servers and it won't replace your
hard-coded DNS server list

-- Tim

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Luke Dean
Sent: Friday, April 22, 2005 11:35 AM
To: Fabian Anklam
Cc: freebsd-questions@freebsd.org
Subject: Re: Prevent DHCP from changing resolv.conf


 I have a minor problem regarding my network configuration,
 specifically that the external interface on my router gets it's IP via
 DHCP from the ISP, so in rc.conf

 ifconfig_xl0=DHCP

 is set. This leads to the single entry in resolv.conf that I want to
 be there, namely

 nameserver 127.0.0.1

 being replaced with my ISP's nameservers, which in return makes
 resolving of LAN IPs or even localhost via the installed BIND
 difficult for the machine. I don't want dhclient to change the
 resolv.conf.

 I checked the man pages for resolv.conf, rc.conf and dhclient but
 couldn't find anything there relating to my problem.

 Thanks, Fabian

In dhclient.conf, put:
prepend domain-name-servers 127.0.0.1;

This keeps the DNS that DHCP gives you, but it puts your local one first 
so you'll be able to find your local domains.

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]