Article 56WNQ DHCPD -t errors when doing initial config

DHCPD -t errors when doing initial config

by
Aquenon
from LinuxQuestions.org on (#56WNQ)
Hi,
I've been following this guide in order to have my DHCP leases automatically mapped to my DNS server so that I can access them by typing their name instead of their IP.

I ran rndc-confgen to generate my key and used the output to build my rndc.conf and named.conf files. I then made a dhcpd.conf file according to the instructions over in /etc/dhcp. Then I was supposed to test what I had so far with dhcpd -t. There was a permissions error which I solved, but now I'm getting this error.
Code:Internet Systems Consortium DHCP Server 4.4.1
Copyright 2004-2018 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/
/etc/dhcp/rndc.conf line 7: semicolon expected.
options {
^
/etc/dhcp/rndc.conf line 9: semicolon expected.
default-server 127.
^
/etc/dhcp/rndc.conf line 10: semicolon expected.
default-port 953;
^
/etc/dhcp/rndc.conf line 10: expecting a parameter or declaration
default-port 953;
^
/etc/dhcp/rndc.conf line 11: expecting a parameter or declaration
};
^
/etc/dhcp/dhcpd.conf line 16: /etc/dhcp/rndc.conf: bad parse.
include "/etc/dhcp/rndc.conf"
^
WARNING: Host declarations are global. They are not limited to the scope you declared them in.
Configuration file errors encountered -- exiting

If you think you have received this message due to a bug rather
than a configuration issue please read the section on submitting
bugs on either our web page at www.isc.org or in the README file
before submitting a bug. These pages explain the proper
process and the information we find helpful for debugging.

exiting.It seems like it's expecting a semicolon where the dot is in the loopback IP. I even tried to replace the dots with semicolons with obvious results. Because of that, I think that may be why it's expecting a semicolon right after the opening brace. And I'm hoping the bad parse error is just a result of whatever is going on with the rest of it.

There are links (ln -s) from /etc/dhcp to /etc/bind for rndc.conf and rndc.key as instructed by that article.

I just can't figure out where it's messing up. There are semicolons at the end of every line (except the one line that the rndc-confgen command generated which I assume was on purpose), and there are closing braces for every opening brace.

Here are all the files in case they're needed as well as the output of the rndc-confgen command.

/etc/bind/rndc.key
Code:key "rndc-key" {
algorithm hmac-sha256;
secret "3HLCd0E0h10zz4Z3KusDoskMi6fEIk1HQvPuTkjN5WA=";
};/etc/bind/rndc.conf
Code:# Start of rndc.conf
key "rndc-key" {
algorithm hmac-sha256;
secret "3HLCd0E0h10zz4Z3KusDoskMi6fEIk1HQvPuTkjN5WA=";
};

options {
default-key "rndc-key";
default-server 127.0.0.1;
default-port 953;
};
# End of rndc.conf/etc/bind/named.conf
Code:# Use with the following in named.conf, adjusting the allow list as needed:
key "rndc-key" {
algorithm hmac-sha256;
secret "3HLCd0E0h10zz4Z3KusDoskMi6fEIk1HQvPuTkjN5WA=";
};

controls {
inet 127.0.0.1 port 953
allow { 127.0.0.1; } keys { "rndc-key"; };
};
# End of named.conf/etc/dhcp/dhcpd.conf
Code:authoritative;
default-lease-time 14400;
max-lease-time 18000;
log-facility local7;

ddns-domainname "tucker.local.";
ddns-rev-domainname "in-addr.arpa.";
ddns-update-style interim;
ignore client-updates;
update-static-leases on;
use-host-decl-names on;
option domain-name "tucker.local.";
include "/etc/dhcp/rndc.key";
update-optimization off;
update-conflict-detection off;
include "/etc/dhcp/rndc.conf";
zone tucker.local. {
primary 192.168.1.1;
key rndc-key;
}
zone 168.192.in-addr.arpa. {
primary 192.168.1.1;
key rndc-key;
}

subnet 192.168.1.0 netmask 255.255.255.0 {
range 192.168.1.50 192.168.1.254;
option subnet-mask 255.255.255.0;
option routers 192.168.1.1;
option domain-name-servers 192.168.1.5;

host gateway {
hardware ethernet e0:63:da:86:0b:d1;
fixed-address 192.168.1.1;
}
host services {
hardware ethernet 10:9a:dd:6d:62:15;
fixed-address 192.168.1.5;
}
host library {
hardware ethernet 08:00:27:0d:a4:9d;
fixed-address 192.168.1.6;
}
host azeroth {
hardware ethernet 00:23:32:30:16:88;
fixed-address 192.168.1.8;
}
host macbook-pro {
hardware ethernet 68:a8:6d:4d:f7:86;
fixed-address 192.168.1.10;
}
host ipad-pro {
hardware ethernet 9c:e6:5e:d4:5c:a1;
fixed-address 192.168.1.25;
}
host smartplug {
hardware ethernet 68:ff:7b:b8:7b:68;
fixed-address 192.168.1.48;
}
host smartstrip {
hardware ethernet 98:da:c4:f1:01:0e;
fixed-address 192.168.1.49;
}
host dhcpdns {
hardware ethernet 10:9a:dd:6d:62:15;
fixed-address 192.168.1.5;
}
}rndc-confgen output:
Code:# Start of rndc.conf
key "rndc-key" {
algorithm hmac-sha256;
secret "3HLCd0E0h10zz4Z3KusDoskMi6fEIk1HQvPuTkjN5WA=";
};

options {
default-key "rndc-key";
default-server 127.0.0.1;
default-port 953;
};
# End of rndc.conf

# Use with the following in named.conf, adjusting the allow list as needed:
# key "rndc-key" {
# algorithm hmac-sha256;
# secret "3HLCd0E0h10zz4Z3KusDoskMi6fEIk1HQvPuTkjN5WA=";
# };
#
# controls {
# inet 127.0.0.1 port 953
# allow { 127.0.0.1; } keys { "rndc-key"; };
# };
# End of named.conflatest?d=yIl2AUoC8zA latest?i=Qfc2u7EiNho:MNZxkLSF8fc:F7zBnMy latest?i=Qfc2u7EiNho:MNZxkLSF8fc:V_sGLiP latest?d=qj6IDK7rITs latest?i=Qfc2u7EiNho:MNZxkLSF8fc:gIN9vFwQfc2u7EiNho
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments