[Samba] Samba - Bind9 DNS - ISC-DHCP - obsolete DNS entries

Martin Krämer mk.maddin at gmail.com
Wed Jan 2 12:11:33 UTC 2019


thanks for reply.
Having the information that this is no situation considered yet is already
helpfull - telling me that I have not missed / missconfigured something. :)

I think the better solution for me is to not even create the unwanted
Filtering for "automatic" dhcp created hostnames (matching '^dhcp-.*$') to
not be added into DNS should to the trick for me here.

Never the less do I understand correctly that there is no automation (not
even BIND9 out of the box) to delete aged/obsolete dns entries

Kind Regards


On Wed, Jan 2, 2019, 12:53 Rowland Penny via samba <samba at lists.samba.org

> On Wed, 2 Jan 2019 12:16:47 +0100
> Martin Krämer via samba <samba at lists.samba.org> wrote:
> > Hi everyone,
> >
> > I have setup a Samba domain with BIND9 dns backend.
> > Using ISC-DHCP-Server and procedure/script described in samba wiki I
> > have configured dynamic dns updates.
> >
> https://wiki.samba.org/index.php/Configure_DHCP_to_update_DNS_records_with_BIND9
> >
> > In my network I am using PXE to deploy new debian machines.
> > Booting a nfsroot and then using chroot to install my new system, for
> > each machine there are two dns entries
> > "dhcp-<pxe>-<device>-<ip>-<address>" created,
> > both having their own IP (I assume one for nfsroot and one for chroot
> > environment).
> > Furthermore during the setup process I change the hostname and use
> > "dhclient -r && dhclient" to be able to resolve the hostname
> > correctly. This is causing an additional dns entry for the correct
> > hostname using the same IP as my chroot environment.
> >
> > After restarting my newly installed client this means I end up with
> > three dns entries for the same machine, one correct and two incorrect.
> > Even after a longer time schedule (I have waited up to 49 hours of the
> > client being turned off) the wrong dns entries do not disappear.
> >
> > My question now is how can I make sure that the wrong dns entries are
> > not created / get updated correctly / disappear after a short amount
> > of time? I would like to end up with only one correct dns entry for
> > one client (NIC).
> >
> This is something I never considered when I wrote the DHCP update
> script (mainly because I do not use PXE), but it is a just a
> bash script :-)
> I think you will need to extend the script to check for the unwanted
> dns entries and then delete them with nsupdate, failing this, use
> another script to delete the unwanted entries at first boot.
> Rowland
> --
> To unsubscribe from this list go to the following URL and read the
> instructions:  https://lists.samba.org/mailman/options/samba

More information about the samba mailing list