LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 08-13-2020, 05:15 PM   #1
Aquenon
LQ Newbie
 
Registered: Jul 2020
Distribution: Ubuntu Server 20.04
Posts: 4

Rep: Reputation: Disabled
Question DHCPD -t errors when doing initial config


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.conf
 
Old 08-13-2020, 07:24 PM   #2
berndbausch
LQ Guru
 
Registered: Nov 2013
Location: Tokyo
Distribution: A few
Posts: 5,322

Rep: Reputation: 1602Reputation: 1602Reputation: 1602Reputation: 1602Reputation: 1602Reputation: 1602Reputation: 1602Reputation: 1602Reputation: 1602Reputation: 1602Reputation: 1602
My guess: The error is caused before the include /etc/dhcp/rndc.conf. Remove or comment the include line and test again.
 
1 members found this post helpful.
Old 08-13-2020, 07:30 PM   #3
Aquenon
LQ Newbie
 
Registered: Jul 2020
Distribution: Ubuntu Server 20.04
Posts: 4

Original Poster
Rep: Reputation: Disabled
That took care of it. It was the second include that included the rndc.conf file.

But this probably won't work without that being in there, so unsure where to go from here.
 
  


Reply

Tags
bind9, dhcpd, ubuntu


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Including external config files to dhcpd config blo0old Linux - Networking 3 02-11-2019 10:06 AM
Errors, Errors, and more Errors (KDE 3.4.x GUI Errors) Dralnu Linux - Software 2 05-13-2006 08:30 AM
dhcpd subnet declaration problems in dhcpd.conf vcrispo Linux - Networking 6 07-15-2005 10:32 AM
DHCPD startup failure, mdk 9.2, dhcpd v3.0.1rc11 fuzzyworm Linux - Networking 1 02-14-2004 03:58 AM
dhcpd.master or dhcpd.conf rickg Linux - Networking 0 04-11-2002 03:34 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 10:26 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration