RE: Getting DHCP to use resolv.conf? AN ANSWER

2006-05-03 Thread Murray Taylor
 -Original Message-
 From: fbsd [mailto:[EMAIL PROTECTED] 
 Sent: Wednesday, 3 May 2006 10:36 PM
 To: Murray Taylor
 Subject: RE: Getting DHCP to use resolv.conf? AN ANSWER
 
 
  -Original Message-
  From: [EMAIL PROTECTED]
  [mailto:[EMAIL PROTECTED] On Behalf Of Lowell 
  Gilbert
  Sent: Friday, 28 April 2006 11:09 PM
  To: [EMAIL PROTECTED]
  Cc: freebsd-questions@freebsd.org
  Subject: Re: Getting DHCP to use resolv.conf?
 
  fbsd [EMAIL PROTECTED] writes:
 
   Does anyone have a script that does this, that they can share?
 
  It will be pretty similar to the script I posted recently 
 for updating 
  your local named's forwarders list automatically.
  [Which is another approach to the same problem, and will generally 
  perform better.]
 
  
   -Original Message-
   From: [EMAIL PROTECTED]
   [mailto:[EMAIL PROTECTED] Behalf Of Bill
 Moran
   Sent: Wednesday, April 26, 2006 5:06 PM
   To: Telting
   Cc: freebsd-questions@freebsd.org
   Subject: Re: Getting DHCP to use resolv.conf?
  
  
   On Wed, 26 Apr 2006 13:56:57 -0700
   Telting [EMAIL PROTECTED] wrote:
  
I would like to know how I can propagate the dns servers which
 the
   dhcp
client puts in resolv.conf to dhcpd.  I only see how I can
 only
explicitly list a domain server with option
 domain-name-servers.
   How
do I propogate non static dns servers?
  
   Write a script to updated the dhcpd.conf file when resolv.conf 
   changes.  dhclient allows you to create hooks that
  automagically run a
   script of your choosing when a new lease is obtained.
  
   Or you could search the list archives for when this exact
  question was
   asked a few weeks ago.
  
   --
   Bill Moran
   Collaborative Fusion Inc.
 
 
 
 man dhclient-script
 
 and my enter and exit scripts below from my home boxen
 
 
 NB I use ddclient from ports to update dns stuff at dyndns.org and
 the
 example.com should be replaced with your domain name in the
 enter-hooks
 script.
 
 These are not totally automatic in what they do, as I prefer to
 'see and
 know' certain changes from my ISP so that is the reason for the
 email
 setup
 
 Murray Taylor
 
 
 
 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED] Behalf Of Murray Taylor
 Sent: Sunday, April 30, 2006 7:56 PM
 To: Lowell Gilbert
 Cc: freebsd-questions@freebsd.org
 Subject: RE: Getting DHCP to use resolv.conf? AN ANSWER
 
 
 Murray.
 
 Using your scripts as a example I coded the following script.
 I can not get the notification logger and email to function.
 I am running postfix launched by the sendmail wrappers on a 
 FreeBSD 6.0 system.
 I am also using the built in dhclient that comes with the 
 base install.
 Could you post the isc_dhclient-script so I can compare it to 
 the one that comes with the base install for differences that 
 may cause this behavior?
 Any other help would be appreciated.
 
 
 When this script runs the logger statements do not create any 
 message in the targeted log files.
 IF I execute the same logger statements from the command line 
 they work as expected.
 This is the boot time messages with mail code commented out.
 
 dc0: link state changed to DOWN
 dc0: no link dc0: link state changed to UP  got link
 dc0: link state changed to DOWN
 DHCPREQUEST on dc0 to 255.255.255.255 port 67
 dc0: link state changed to UP
 DHCPACK from 10.0.10.2
 dc0: link state changed to DOWN
 bound to 10.0.10.4 -- renewal in 43200 seconds.
 
 
 IF I execute the cat command to issue the notification email 
 from the command line it works fine, but when used in the 
 script I get these messages during boot process.
 
 ~/.mailrc: No match.
 DHCPREQUEST on dc0 to 255.255.255.255 port 67
 /libexec/ld-elf.so.1: Shared object libpcre.so.0 not found, 
 required by send-mail
 dc0: link state changed to UP
 DHCPREQUEST on dc0 to 255.255.255.255 port 67 DHCPACK from 10.0.10.2
 dc0: link state changed to DOWN
 bound to 10.0.10.4 -- renewal in 43200 seconds.
 
 
 
 
 #!/bin/sh
 
 #  Start of refresh dhcpd dns ip script 
 # # This script will propagate to dhcpd the 
 changed dns servers ip # address which dhcp-client puts in 
 resolv.conf.
 #
 # In dhcpd.conf replace the option domain-name-servers line 
 with this # #  include /etc/dhcpd.name-servers; # # Script 
 uses the dhcpc variables to build temp line in dhcpd format.
 # Then compare temp content to production content.
 # If different replace production content with new content 
 from temp # and restart dhcp to reread dhcpd.conf containing 
 new ISP dns ip addresses.
 #
 # logging event and sending email to user root is optional.
 #
 # Note: All LAN machines using dhcpd will not get new ISP dns 
 ip # addresses until they reboot or their lease comes up for renewal.
 #
 # Each of the following lines must be one long line. IE: no 
 wrap around 
 
 
 # load my_domain_name_servers variable with ISP dns ip

RE: Getting DHCP to use resolv.conf? AN ANSWER

2006-05-03 Thread fbsd


 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED] Behalf Of Murray
Taylor
 Sent: Sunday, April 30, 2006 7:56 PM
 To: Lowell Gilbert
 Cc: freebsd-questions@freebsd.org
 Subject: RE: Getting DHCP to use resolv.conf? AN ANSWER


 Murray.

 Using your scripts as a example I coded the following script.
 I can not get the notification logger and email to function.
 I am running postfix launched by the sendmail wrappers on a
 FreeBSD 6.0 system.
 I am also using the built in dhclient that comes with the
 base install.
 Could you post the isc_dhclient-script so I can compare it to
 the one that comes with the base install for differences that
 may cause this behavior?
 Any other help would be appreciated.


 When this script runs the logger statements do not create any
 message in the targeted log files.
 IF I execute the same logger statements from the command line
 they work as expected.
 This is the boot time messages with mail code commented out.

 dc0: link state changed to DOWN
 dc0: no link dc0: link state changed to UP  got link
 dc0: link state changed to DOWN
 DHCPREQUEST on dc0 to 255.255.255.255 port 67
 dc0: link state changed to UP
 DHCPACK from 10.0.10.2
 dc0: link state changed to DOWN
 bound to 10.0.10.4 -- renewal in 43200 seconds.


 IF I execute the cat command to issue the notification email
 from the command line it works fine, but when used in the
 script I get these messages during boot process.

 ~/.mailrc: No match.
 DHCPREQUEST on dc0 to 255.255.255.255 port 67
 /libexec/ld-elf.so.1: Shared object libpcre.so.0 not found,
 required by send-mail
 dc0: link state changed to UP
 DHCPREQUEST on dc0 to 255.255.255.255 port 67 DHCPACK from
10.0.10.2
 dc0: link state changed to DOWN
 bound to 10.0.10.4 -- renewal in 43200 seconds.




 #!/bin/sh

 #  Start of refresh dhcpd dns ip script
 # # This script will propagate to dhcpd the
 changed dns servers ip # address which dhcp-client puts in
 resolv.conf.
 #
 # In dhcpd.conf replace the option domain-name-servers line
 with this # #  include /etc/dhcpd.name-servers; # # Script
 uses the dhcpc variables to build temp line in dhcpd format.
 # Then compare temp content to production content.
 # If different replace production content with new content
 from temp # and restart dhcp to reread dhcpd.conf containing
 new ISP dns ip addresses.
 #
 # logging event and sending email to user root is optional.
 #
 # Note: All LAN machines using dhcpd will not get new ISP dns
 ip # addresses until they reboot or their lease comes up for
renewal.
 #
 # Each of the following lines must be one long line. IE: no
 wrap around



 # load my_domain_name_servers variable with ISP dns ip
 addresses from dhcpc my_domain_name_servers=`echo
 $new_domain_name_servers | sed -e 's/ /, /g'`

 # Create single line in file to be included in dhcpd.conf
 echo option domain-name-servers $my_domain_name_servers ; 
 /etc/dhcpd.name-servers.tmp

 # See if different from what production file contains cmp -s
 /etc/dhcpd.name-servers.tmp /etc/dhcpd.name-servers if [ $?
 -gt 0 ]; then
   # move the new file into place
   mv /etc/dhcpd.name-servers.tmp /etc/dhcpd.name-servers
   # restart dhcp using whatever is appropriate for your platform
   #service dhcpd restart
   #/usr/local/etc/rc.d/isc-dhcpd.sh restart -q
   # Write message to /var/log/dhcpc.log to document event.
   logger -p user.warning -t dhclient Your ISP DNS IP
 addresses changed.
   # Write message to /var/log/dhcpd.log to document event.
   logger -p local1.warning -t dhclient Your ISP DNS IP
 addresses changed.

   # Send notification email to root user. This can wrap to next
line.
 #  cat  EOF | mail -s dhcp client changed ISP DNS IP addresses
 root
 #The dhclient-exit-hook script was invoked and has determined
 that your #ISP changed the IP address of their DNS servers.
 The new values have been #auto updated to dhcpd.conf and dhcp
 restarted so they are now in effect.
 #
 #Note: All LAN machines using dhcpd will not start using the
 new ISP dns #ip addresses until they reboot or their lease
 comes up for renewal.
 #EOF
 fi
 rm -f /etc/dhcpd.name-servers.tmp
 ###  End of refresh dhcpd dns ip script
 ###

The script I sent are operational on FBSD 4.11
with the enter/exit-hooks scripts that are
part of the base install.
NB Dont forget I run the ipf firewall rewrite rules script manually
as
root
when my IP number changes, but the DHCP - resolv.conf is automatic
via exit-hooks

The scripts are always called by dhclient, what I put in them
is what I attached.

And I am also using Postfix ... As far as I remenber pcre is only
needed by Postfix if you use pcre:check-file regular expression
type files in main.cf. If you use regexp:check-file then pcre is
not
used.


Murray Taylor

---

Murry
The only difference

RE: Getting DHCP to use resolv.conf? AN ANSWER

2006-05-03 Thread fbsd


The script I sent are operational on FBSD 4.11
with the enter/exit-hooks scripts that are
part of the base install.
NB Dont forget I run the ipf firewall rewrite rules script manually
as
root
when my IP number changes, but the DHCP - resolv.conf is automatic
via exit-hooks

The scripts are always called by dhclient, what I put in them
is what I attached.

And I am also using Postfix ... As far as I remenber pcre is only
needed by Postfix if you use pcre:check-file regular expression
type files in main.cf. If you use regexp:check-file then pcre is
not
used.


Murray Taylor


---
---

I checked postfix main.default.cf and find no pcre or regexp
options.
Please explain what you are talking about.

Thanks for your help

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


RE: Getting DHCP to use resolv.conf? AN ANSWER

2006-05-03 Thread Murray Taylor
 -Original Message-
 From: fbsd [mailto:[EMAIL PROTECTED] 
 Sent: Thursday, 4 May 2006 11:02 AM
 To: Murray Taylor
 Cc: freebsd-questions
 Subject: RE: Getting DHCP to use resolv.conf? AN ANSWER
 
 
 
 The script I sent are operational on FBSD 4.11 with the 
 enter/exit-hooks scripts that are part of the base install.
 NB Dont forget I run the ipf firewall rewrite rules script 
 manually as root when my IP number changes, but the DHCP - 
 resolv.conf is automatic via exit-hooks
 
 The scripts are always called by dhclient, what I put in them 
 is what I attached.
 
 And I am also using Postfix ... As far as I remenber pcre is 
 only needed by Postfix if you use pcre:check-file regular 
 expression type files in main.cf. If you use 
 regexp:check-file then pcre is not used.
 
 
 Murray Taylor
 
 
 ---
 ---
 
 I checked postfix main.default.cf and find no pcre or regexp
 options.
 Please explain what you are talking about.
 
 Thanks for your help


/usr/local/etc/postfix/dist-header_checks

these are optional elements you can add to main.cf.

if you havent decided to use them then they wont be in main.cf

try  grep pcre: *   in the /usr/local/etc/postfix directory

this will find where you may have used them.  
generally only used on various lookup tables etc..


Murray Taylor

Special Projects Engineer
Bytecraft Systems

P: +61 3 8710 2555
F: +61 3 8710 2599
D: +61 3 9238 4275
E: [EMAIL PROTECTED] 

--
Any intelligent fool can make things bigger and more complex... It
takes a
touch of genius - and a lot of courage to move in the opposite
direction.
  Albert Einstein 
-- 
---
The information transmitted in this e-mail is for the exclusive
use of the intended addressee and may contain confidential
and/or privileged material. Any review, re-transmission,
dissemination or other use of it, or the taking of any action
in reliance upon this information by persons and/or entities
other than the intended recipient is prohibited. If you
received this in error, please inform the sender and/or
addressee immediately and delete the material. 

E-mails may not be secure, may contain computer viruses and
may be corrupted in transmission. Please carefully check this
e-mail (and any attachment) accordingly. No warranties are
given and no liability is accepted for any loss or damage
caused by such matters.
---

***This Email has been scanned for Viruses by MailMarshal.***
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


RE: Getting DHCP to use resolv.conf? AN ANSWER

2006-05-03 Thread Murray Taylor

 -Original Message-
 From: fbsd [mailto:[EMAIL PROTECTED] 
 Sent: Thursday, 4 May 2006 10:56 AM
 To: Murray Taylor
 Cc: freebsd-questions
 Subject: RE: Getting DHCP to use resolv.conf? AN ANSWER
 
 
 
  -Original Message-
  From: [EMAIL PROTECTED]
  [mailto:[EMAIL PROTECTED] Behalf Of Murray
 Taylor
  Sent: Sunday, April 30, 2006 7:56 PM
  To: Lowell Gilbert
  Cc: freebsd-questions@freebsd.org
  Subject: RE: Getting DHCP to use resolv.conf? AN ANSWER
 
 
  Murray.
 
  Using your scripts as a example I coded the following script.
  I can not get the notification logger and email to function.
  I am running postfix launched by the sendmail wrappers on a FreeBSD 
  6.0 system.
  I am also using the built in dhclient that comes with the base 
  install.
  Could you post the isc_dhclient-script so I can compare it 
 to the one 
  that comes with the base install for differences that may 
 cause this 
  behavior?
  Any other help would be appreciated.
 
 
  When this script runs the logger statements do not create 
 any message 
  in the targeted log files.
  IF I execute the same logger statements from the command line they 
  work as expected.
  This is the boot time messages with mail code commented out.
 
  dc0: link state changed to DOWN
  dc0: no link dc0: link state changed to UP  got link
  dc0: link state changed to DOWN
  DHCPREQUEST on dc0 to 255.255.255.255 port 67
  dc0: link state changed to UP
  DHCPACK from 10.0.10.2
  dc0: link state changed to DOWN
  bound to 10.0.10.4 -- renewal in 43200 seconds.
 
 
  IF I execute the cat command to issue the notification 
 email from the 
  command line it works fine, but when used in the script I get these 
  messages during boot process.
 
  ~/.mailrc: No match.
  DHCPREQUEST on dc0 to 255.255.255.255 port 67
  /libexec/ld-elf.so.1: Shared object libpcre.so.0 not 
 found, required 
  by send-mail
  dc0: link state changed to UP
  DHCPREQUEST on dc0 to 255.255.255.255 port 67 DHCPACK from
 10.0.10.2
  dc0: link state changed to DOWN
  bound to 10.0.10.4 -- renewal in 43200 seconds.
 
 
 
 
  #!/bin/sh
 
  #  Start of refresh dhcpd dns ip script # # 
  This script will propagate to dhcpd the changed dns servers ip # 
  address which dhcp-client puts in resolv.conf.
  #
  # In dhcpd.conf replace the option domain-name-servers line with 
  this # #  include /etc/dhcpd.name-servers; # # Script 
 uses the dhcpc 
  variables to build temp line in dhcpd format.
  # Then compare temp content to production content.
  # If different replace production content with new content 
 from temp # 
  and restart dhcp to reread dhcpd.conf containing new ISP dns ip 
  addresses.
  #
  # logging event and sending email to user root is optional.
  #
  # Note: All LAN machines using dhcpd will not get new ISP dns ip # 
  addresses until they reboot or their lease comes up for
 renewal.
  #
  # Each of the following lines must be one long line. IE: no wrap 
  around
 
 
 
  # load my_domain_name_servers variable with ISP dns ip 
 addresses from 
  dhcpc my_domain_name_servers=`echo $new_domain_name_servers 
 | sed -e 
  's/ /, /g'`
 
  # Create single line in file to be included in dhcpd.conf 
 echo option 
  domain-name-servers $my_domain_name_servers ;  
  /etc/dhcpd.name-servers.tmp
 
  # See if different from what production file contains cmp -s 
  /etc/dhcpd.name-servers.tmp /etc/dhcpd.name-servers if [ $?
  -gt 0 ]; then
# move the new file into place
mv /etc/dhcpd.name-servers.tmp /etc/dhcpd.name-servers
# restart dhcp using whatever is appropriate for your platform
#service dhcpd restart
#/usr/local/etc/rc.d/isc-dhcpd.sh restart -q
# Write message to /var/log/dhcpc.log to document event.
logger -p user.warning -t dhclient Your ISP DNS IP addresses 
  changed.
# Write message to /var/log/dhcpd.log to document event.
logger -p local1.warning -t dhclient Your ISP DNS IP addresses 
  changed.
 
# Send notification email to root user. This can wrap to next
 line.
  #  cat  EOF | mail -s dhcp client changed ISP DNS IP addresses
  root
  #The dhclient-exit-hook script was invoked and has determined that 
  your #ISP changed the IP address of their DNS servers.
  The new values have been #auto updated to dhcpd.conf and dhcp 
  restarted so they are now in effect.
  #
  #Note: All LAN machines using dhcpd will not start using 
 the new ISP 
  dns #ip addresses until they reboot or their lease comes up for 
  renewal.
  #EOF
  fi
  rm -f /etc/dhcpd.name-servers.tmp
  ###  End of refresh dhcpd dns ip script 
  ###
 
 The script I sent are operational on FBSD 4.11 with the 
 enter/exit-hooks scripts that are part of the base install.
 NB Dont forget I run the ipf firewall rewrite rules script 
 manually as root when my IP number changes, but the DHCP - 
 resolv.conf is automatic via exit-hooks

RE: Getting DHCP to use resolv.conf? AN ANSWER

2006-04-30 Thread Murray Taylor
 -Original Message-
 From: [EMAIL PROTECTED] 
 [mailto:[EMAIL PROTECTED] On Behalf Of 
 Lowell Gilbert
 Sent: Friday, 28 April 2006 11:09 PM
 To: [EMAIL PROTECTED]
 Cc: freebsd-questions@freebsd.org
 Subject: Re: Getting DHCP to use resolv.conf?
 
 fbsd [EMAIL PROTECTED] writes:
 
  Does anyone have a script that does this, that they can share?
 
 It will be pretty similar to the script I posted recently for 
 updating your local named's forwarders list automatically.  
 [Which is another approach to the same problem, and will 
 generally perform better.]
 
  
  -Original Message-
  From: [EMAIL PROTECTED]
  [mailto:[EMAIL PROTECTED] Behalf Of Bill Moran
  Sent: Wednesday, April 26, 2006 5:06 PM
  To: Telting
  Cc: freebsd-questions@freebsd.org
  Subject: Re: Getting DHCP to use resolv.conf?
  
  
  On Wed, 26 Apr 2006 13:56:57 -0700
  Telting [EMAIL PROTECTED] wrote:
  
   I would like to know how I can propagate the dns servers which the
  dhcp
   client puts in resolv.conf to dhcpd.  I only see how I can only 
   explicitly list a domain server with option domain-name-servers.
  How
   do I propogate non static dns servers?
  
  Write a script to updated the dhcpd.conf file when resolv.conf 
  changes.  dhclient allows you to create hooks that 
 automagically run a 
  script of your choosing when a new lease is obtained.
  
  Or you could search the list archives for when this exact 
 question was 
  asked a few weeks ago.
  
  --
  Bill Moran
  Collaborative Fusion Inc.
 


man dhclient-script

and my enter and exit scripts below from my home boxen


NB I use ddclient from ports to update dns stuff at dyndns.org and the
example.com should be replaced with your domain name in the enter-hooks
script.

These are not totally automatic in what they do, as I prefer to 'see and
know'
certain changes from my ISP so that is the reason for the email
setup


Murray Taylor

Special Projects Engineer
Bytecraft Systems

P: +61 3 8710 2555
F: +61 3 8710 2599
D: +61 3 9238 4275
E: [EMAIL PROTECTED] 

--
Any intelligent fool can make things bigger and more complex... It
takes a
touch of genius - and a lot of courage to move in the opposite
direction.
  Albert Einstein 
--

 

---
The information transmitted in this e-mail is for the exclusive
use of the intended addressee and may contain confidential
and/or privileged material. Any review, re-transmission,
dissemination or other use of it, or the taking of any action
in reliance upon this information by persons and/or entities
other than the intended recipient is prohibited. If you
received this in error, please inform the sender and/or
addressee immediately and delete the material. 

E-mails may not be secure, may contain computer viruses and
may be corrupted in transmission. Please carefully check this
e-mail (and any attachment) accordingly. No warranties are
given and no liability is accepted for any loss or damage
caused by such matters.
---

***This Email has been scanned for Viruses by MailMarshal.***


dhclient-enter-hooks
Description: dhclient-enter-hooks


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

RE: Getting DHCP to use resolv.conf?

2006-04-30 Thread fbsd
I got this from the ISC-dhcp questions list.

Note: This might not work, Not tested, No guarantees.
Use this as starter code and after testing post what
you get working for the list archives.

In dhcpd.conf comment out the line option domain-name-servers
and add following line

  include /etc/dhcpd.name-servers;

This will include the contents of the named file into dhcpd.conf.
It is easier to manipulate a small separate file containing only
a single line, rather than trying to manage the whole
dhcpd.conf file

Every time dhcp-client runs it will try to run
/etc/dhclient-exit-hooks file if it exists.

Create a empty /etc/dhclient-exit-hooks file and populate with this

###  Start of refresh dhcpd dns ip  
# This script will propagate to dhcpd the changed dns servers ip
address
# which dhcp-client puts in resolv.conf.
#
# In dhcpd.conf replace the option domain-name-servers line with
this
#
#  include /etc/dhcpd.name-servers;
#
# Spript uses the dhcpc variables to build temp line in dhcpd
format.
# Then compare temp content to production content.
# If different replace production content with new content from
temp,
# and restart dhcp to reread dhcpd.conf containing new ISP dns ip
addresses.
#
# logging event and sending email to user root is optional.
#
# Note: All LAN machines using dhcpd will not get new ISP dns ip
addresses
# until they reboot or their lease comes up for renewal.
#
# Each of the following lines must be one long line. IE: no wrap
arounds



# load my_domain_name_servers variable with ISP dns ip addresses
from dhcpc
my_domain_name_servers=`echo $new_domain_name_servers | sed -e 's/
/, /g'`

# Create single line in file to be included in dhcpd.conf
echo option domain-name-servers $my_domain_name_servers ; 
/etc/dhcpd.name-servers.tmp

# See if different from what production file contains
cmp -s /etc/dhcpd.name-servers.tmp /etc/dhcpd.name-servers
if [ $? -gt 0 ]; then
  # move the new file into place
  mv /etc/dhcpd.name-servers.tmp /etc/dhcpd.name-servers
  # restart dhcp using whatever is appropriate for your platform
  #service dhcpd restart
  /usr/local/etc/rc.d/isc-dhcpd.sh restart -q
  # Write message to log to document event.
  logger -t dhclient ISP DNS IP address changed to $new_ip_address
  # Send notification email to root user. This can wrap to next
line.
  mail -s dhcp client changed ISP DNS IP addresses root The
dhclient-exit-hooks script was invoked and has determined that your
ISP changed the IP address of their DNS servers. The new values have
been auto updated to dhcpd.conf and dhcpd restarted so they are now
in effect.

Note: All LAN machines using dhcpd will not start using the new ISP
dns ip addresses until they reboot or their lease comes up for
renewal.
fi

rm -f /etc/dhcpd.name-servers.tmp

###  End of refresh dhcpd dns ip  




-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of Telting
Sent: Wednesday, April 26, 2006 3:40 PM
To: freebsd-questions@freebsd.org
Subject: Getting DHCP to use resolv.conf?


I would like to know how I can propagate the dns servers which the
dhcp
client puts in resolv.conf to dhcpd.  I only see how I can only
explicitly list a domain server with option domain-name-servers.
How
do I propogate non static dns servers?

Chris

___
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]


Re: Getting DHCP to use resolv.conf?

2006-04-28 Thread Lowell Gilbert
Don't top-post, please.

fbsd [EMAIL PROTECTED] writes:

 Does anyone have a script that does this, that they can share?

It will be pretty similar to the script I posted recently for updating
your local named's forwarders list automatically.  [Which is another
approach to the same problem, and will generally perform better.]

 
 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED] Behalf Of Bill Moran
 Sent: Wednesday, April 26, 2006 5:06 PM
 To: Telting
 Cc: freebsd-questions@freebsd.org
 Subject: Re: Getting DHCP to use resolv.conf?
 
 
 On Wed, 26 Apr 2006 13:56:57 -0700
 Telting [EMAIL PROTECTED] wrote:
 
  I would like to know how I can propagate the dns servers which the
 dhcp
  client puts in resolv.conf to dhcpd.  I only see how I can only
  explicitly list a domain server with option domain-name-servers.
 How
  do I propogate non static dns servers?
 
 Write a script to updated the dhcpd.conf file when resolv.conf
 changes.  dhclient allows you to create hooks that automagically
 run a script of your choosing when a new lease is obtained.
 
 Or you could search the list archives for when this exact question
 was asked a few weeks ago.
 
 --
 Bill Moran
 Collaborative Fusion Inc.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


RE: Getting DHCP to use resolv.conf?

2006-04-27 Thread fbsd

Does anyone have a script that does this, that they can share?


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of Bill Moran
Sent: Wednesday, April 26, 2006 5:06 PM
To: Telting
Cc: freebsd-questions@freebsd.org
Subject: Re: Getting DHCP to use resolv.conf?


On Wed, 26 Apr 2006 13:56:57 -0700
Telting [EMAIL PROTECTED] wrote:

 I would like to know how I can propagate the dns servers which the
dhcp
 client puts in resolv.conf to dhcpd.  I only see how I can only
 explicitly list a domain server with option domain-name-servers.
How
 do I propogate non static dns servers?

Write a script to updated the dhcpd.conf file when resolv.conf
changes.  dhclient allows you to create hooks that automagically
run a script of your choosing when a new lease is obtained.

Or you could search the list archives for when this exact question
was asked a few weeks ago.

--
Bill Moran
Collaborative Fusion Inc.
___
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]


Re: Getting DHCP to use resolv.conf?

2006-04-27 Thread michael johnson
On 4/26/06, Bill Moran [EMAIL PROTECTED] wrote:

 On Wed, 26 Apr 2006 13:56:57 -0700
 Telting [EMAIL PROTECTED] wrote:

  I would like to know how I can propagate the dns servers which the dhcp
  client puts in resolv.conf to dhcpd.  I only see how I can only
  explicitly list a domain server with option domain-name-servers.  How
  do I propogate non static dns servers?

 Write a script to updated the dhcpd.conf file when resolv.conf
 changes.  dhclient allows you to create hooks that automagically
 run a script of your choosing when a new lease is obtained.

 Or you could search the list archives for when this exact question
 was asked a few weeks ago.


look at dhclient.conf(5) and look at the part about
prepend domain-name-servers

Michael


--
 Bill Moran
 Collaborative Fusion Inc.
 ___
 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]


RE: Getting DHCP to use resolv.conf?

2006-04-27 Thread fbsd
I read the man dhclient.conf(5) and paid special attention to the
part about
prepend domain-name-servers.

It does not say anything about passing the dns info dhcp client puts
into resolv.conf onto the dhcpd.conf option domain-name-servers
statement.

I don't think you understood the original question.
I may be wrong so please explain how dhcp client prepend
domain-name-servers
option effects the dhcpd config file?


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of michael
johnson
Sent: Thursday, April 27, 2006 7:36 AM
To: Bill Moran
Cc: Telting; freebsd-questions@freebsd.org
Subject: Re: Getting DHCP to use resolv.conf?


On 4/26/06, Bill Moran [EMAIL PROTECTED] wrote:

 On Wed, 26 Apr 2006 13:56:57 -0700
 Telting [EMAIL PROTECTED] wrote:

  I would like to know how I can propagate the dns servers which
the dhcp
  client puts in resolv.conf to dhcpd.  I only see how I can only
  explicitly list a domain server with option
domain-name-servers.  How
  do I propogate non static dns servers?

 Write a script to updated the dhcpd.conf file when resolv.conf
 changes.  dhclient allows you to create hooks that automagically
 run a script of your choosing when a new lease is obtained.

 Or you could search the list archives for when this exact question
 was asked a few weeks ago.


look at dhclient.conf(5) and look at the part about
prepend domain-name-servers

Michael


--
 Bill Moran
 Collaborative Fusion Inc.
 ___
 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]

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


Re: Getting DHCP to use resolv.conf?

2006-04-26 Thread Bill Moran
On Wed, 26 Apr 2006 13:56:57 -0700
Telting [EMAIL PROTECTED] wrote:

 I would like to know how I can propagate the dns servers which the dhcp
 client puts in resolv.conf to dhcpd.  I only see how I can only
 explicitly list a domain server with option domain-name-servers.  How
 do I propogate non static dns servers?

Write a script to updated the dhcpd.conf file when resolv.conf
changes.  dhclient allows you to create hooks that automagically
run a script of your choosing when a new lease is obtained.

Or you could search the list archives for when this exact question
was asked a few weeks ago.

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