I've been doing some work on the integration. dhcp 3.0 will integrate with bind 8.x and provide dynamic updates to DNS. I've got it working at work. My attempt is to do it with dhcp 2.0 which is what is being shipped on e-smith. I was able to modify e-smith to the point of being ready for the script listed below. However the script does not appear to correctly work on e-smith and I'm reaching the limit on the amount of time I can spend on this. If someone would like to finish this I'm including my work to date.
download file from
http://www.heronforge.net/~stephen/DHCP-DNS/dhcp-dns.htmlto /root with lynx if you wish
extract files with tar -zxf dhcp-dns.0.70.tar.gz
mv DHCP-DNS.0.70 DHCP-DNS
Change files:
/root/DHCP-DNS/ddns.cron.pl
my $DHCPD="/var/lib/dhcp/dhcpd.leases";
my $DOMAIN="speacock.com";
/root/DHCP-DNS/ndc.cron.pl
my $DDNSHOME="/root/DHCP-DNS";
mkdir -p /etc/e-smith/templates-custom/etc/named.conf/
cp /etc/e-smith/templates/etc/named.conf/40localptrs /etc/e-smith/templates-custom/etc/named.conf/
change to match the following:
zone "{ esmith::util::computeLocalNetworkReversed ($LocalIP, $LocalNetmask) }" \
{
type master;
allow-update \{127.0.0.1;\};
file "named.localnetwork";
\};
cp /etc/e-smith/templates/etc/named.conf/60domains /etc/e-smith/templates-custom/etc/named.conf/
change to match the following:
zone "$domain"
{
type master;
file "db.$domain";
allow-update {127.0.0.1;};
};
mkdir -p /etc/e-smith/templates-custom/var/named/named.localnetwork/
cp /etc/e-smith/templates/var/named/named.localnetwork/50localaddresses /etc/e-smith/templates-custom/var/named/named.localnetwork/
edit 50localaddresses and delete the following lines
for ($i = 1; $i <= $maxHostid; $i++)
{
my $ip = esmith::util::IPaddrToBackwardQuad ($networkBits | $i);
my $hostname = sprintf ("pc-%.5d", $i);
$ip2name{$ip} = $hostname;
}
which create the pc-0001, etc. reverse DNS entries
mkdir /etc/e-smith/templates-custom/var/named/named.primarydomain
cp /etc/e-smith/templates/var/named/named.primarydomain/50localnames /etc/e-smith/templates-custom/var/named/named.primarydomain
edit 50localnames and delete the following lines
for ($i = 1; $i <= $maxHostid; $i++)
{
my $ip = esmith::util::IPaddrToQuad ($networkBits | $i);
my $hostname = sprintf ("pc-%.5d", $i);
$name2ip{$hostname} = $ip;
}
which create the pc-0001, etc. forward DNS entries
Do Not run:
/sbin/e-smith/expand-template /etc/named.conf
named.conf is not in /etc it is chrooted to /home/dns/etc
expand-template will place it in /etc and it will not work.
Instead go into e-smith web manager Collabaration/Virtual Domains and create a virtual domain.
This will trigger the proper creation of the named.conf file.
Sean