regex for dns update

Glenn Satchell glenn.satchell at uniq.com.au
Tue May 8 13:56:06 UTC 2012


On 05/02/12 21:58, Tom Schmitt wrote:
> Hi,
>
> my dhcpd is sending DNS-updates to the DNS server when a lease is given to a dhcp client with the name the dhcp client is providing.
>
> Now I want this only if the name is following a given pattern, something like:
>
> if($clientname=~/^[A-Za-z]{4}\d{4}$/) {
>       send_dns_update;
> }
> else {
>       dont_send_a_dns_update;
> }
>
> Can anyone tell me, what the syntax is to configure this on a global scope in dhcpd.conf?
>
> Or a link where the syntax is explained?
>
> Thanks,
> Tom.

The syntax for 'if' and regex matches are explained in the dhcp-eval(5) 
man page.

Other useful DHCP man pages shipped with the ISC distribution are: 
dhcpd.conf(5), dhcp-options(5), dhclient.conf(5), dhcpd.leases(5) and 
dhcpd(8).

There was a recent post (in the last month) that covered a similar 
topic, with some configuration that may be useful for you.

-- 
regards,
-glenn
--
Glenn Satchell                            |  Miss 9: What do you
Uniq Advances Pty Ltd, Sydney Australia   |  do at work Dad?
mailto:glenn.satchell at uniq.com.au         |  Miss 6: He just
http://www.uniq.com.au tel:0409-458-580   |  types random stuff.


More information about the dhcp-users mailing list