If isc-dhcp gets restarted, it might have to deal with RFC-1918 zones
being previously populated by an earlier instance. In that case, we
need to know if we're modified versus initially adding the zones.
The special handling of RFC-1918 zones in Bind is quirky, and there
should be a patch soon to make it more friendly, but in the meantime
you might have to use:
disable-empty-zone 168.192.in-addr.arpa;
Or similar depending on which address block you poach.
Signed-off-by: Philip Prindeville <philipp@redfish-solutions.com>
Updates to in-addr.arpa are being rejected with:
update failed: REFUSED
because we create an empty zone, and then try to add it again
when it already exists. So use modzone instead to update it.
Signed-off-by: Philip Prindeville <philipp@redfish-solutions.com>
This changes isc-dhcp's init script to create bind zones using the tools
bind provides for that scenario instead of crafting separate zone
configuration by hand.
At the same time, remove the use of /tmp/bind/named.conf.local and add
permissions for dynamic zone creation to bind.
Signed-off-by: David Härdeman <david@hardeman.nu>
It's a minor difference and they're handled the same, but that
might change as we move to Kea.
Signed-off-by: Philip Prindeville <philipp@redfish-solutions.com>
Handle not having a dynamic pool correctly without ipcalc.sh
generating noise about it.
Signed-off-by: Philip Prindeville <philipp@redfish-solutions.com>
ipcalc.sh no longer outputs invalid ranges and fails with an error code in
such cases. React to the error.
Signed-off-by: Leon M. Busch-George <leon@georgemail.eu>
With #12925, 'BROADCAST' will no longer be set if there is no local
broadcast address (rather than holding the global broadcast address).
Prepare for the merge but stay compatible with the old version of ipcalc.
Signed-off-by: Leon M. Busch-George <leon@georgemail.eu>
I've noticed my AppleTV's refresh their leases ever minute unless
I explicitly force their renewal time higher, because it doesn't
default to 50% of the lease time.
Signed-off-by: Philip Prindeville <philipp@redfish-solutions.com>
If named is configured to not listen on any IPv6 interfaces,
then we should run 'nsupdate' with the '-4' argument.
Also:
* cleanup RFC-1918 address detection;
* don't generate PTR records for domain entries that aren't
RFC-1918 addresses or these will generate NOTAUTH failures;
We're assuming that we're doing DNS split-horizon and that
internal addresses aren't routable.
Signed-off-by: Philip Prindeville <philipp@redfish-solutions.com>
Not including an A record mapping will cause nsupdate to balk at
CNAME and MX records (and probably SRV as well) because the target
will be unknown at the time of parsing, until the lease gets
activated.
We need these RR's to be in place well before the servers even
come up.
Signed-off-by: Philip Prindeville <philipp@redfish-solutions.com>
Start after named is running.
Add support for "cname", "domain", "mxhost", and "srvhost" configs.
Signed-off-by: Philip Prindeville <philipp@redfish-solutions.com>
On some platforms where interfaces come up very slowly, this can
cause a race-condition with dhcpd coming up before all the interfaces
have finished initializing.
Signed-off-by: Philip Prindeville <philipp@redfish-solutions.com>
The internal nameservers and the DHCP default domain should be
squirted into /tmp/resolv.conf.
Signed-off-by: Philip Prindeville <philipp@redfish-solutions.com>
dhcrelay has the ability to monitor interfaces for requests
in a single direction only rather than listening to all
interfaces for requests.
Doing this allows one to suppress the duplication of having
the relay forward requests from the same network that the
DHCP server is on.
Signed-off-by: Brian J. Murrell <brian@interlinx.bc.ca>
Sometimes it's necessary to set per-host options like:
list dhcp_option 'option:always-broadcast,true'
for hosts that don't understand unicast replies. There might
be other options you might want to set on a per-host basis,
such as extensions-path, dhcp-message-text, etc.
Signed-off-by: Philip Prindeville <philipp@redfish-solutions.com>
Some /etc/config-destined files are in files/ and suffixed with
.conf while others are in files/etc/config/ which isn't consistent.
Put everything in files/ and call it good.
Signed-off-by: Philip Prindeville <philipp@redfish-solutions.com>
Allow specifying NTP servers, search domains, etc. by the administrator
directly specifying DHCP options (per interface, i.e. per pool).
Signed-off-by: Philip Prindeville <philipp@redfish-solutions.com>
Setting a domain now results in 'option domain-name "xyzzy";'
being generated globally.
Signed-off-by: Philip Prindeville <philipp@redfish-solutions.com>
Convert init-script to procd and allow to configure
isc-dhcp-server via UCI. Allow most by-network and by-host options
supported by dnsmasq.
User-defined dhcp-options are not supported yet, neither are tags.
Existing configurations with use-edited /etc/dhcpd.conf are still
respected, hence to enjoy the new features you have to migrate
your configuration to UCI and delete /etc/dhcpd.conf.
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
Version bumped to 4.3.5. Separated out compile/install steps since
compiling with $DESTDIR yields bogus results. Removed rfc-3527 patch
as something similar (better) is now upstream (well, more complete
error checking anyway). Change relay scripts from '-l ifname' to
'-U ifname' to correspond to upstream changes.
Signed-off-by: Philip Prindeville <philipp@redfish-solutions.com>