Link to home
Start Free TrialLog in
Avatar of Goutham
GouthamFlag for India

asked on

dhcp not starting on ubuntu server when configured for ddns

Dear Experts
installed ubuntu 14.4 for setting up ddns server.
used rndc.key  control statement in named.conf.  Secondly by default dhcpd won't be able to read rndc.key.  hence Created a separate key for dynamic updates using  command dnssec-keygen -a HMAC-MD5 -b 128 -n HOST ddns-key

bind is working by loading all the zones by dhcp is not getting started it is showing an error when attempt to start , below posted the syslog report
Jan  5 03:21:34 lampsrv dhcpd: Can't open /etc/bind/ddns.key: Permission denied
Jan  5 03:21:34 lampsrv kernel: [32053.009374] audit: type=1400 audit(1451944294                                                                                        .048:56): apparmor="DENIED" operation="open" profile="/usr/sbin/dhcpd" name="/et                                                                                        c/bind/ddns.key" pid=7411 comm="dhcpd" requested_mask="r" denied_mask="r" fsuid=                                                                                        0 ouid=106
Jan  5 03:21:34 lampsrv kernel: [32053.010233] init: isc-dhcp-server pre-start p                                                                                        rocess (7409) terminated with status 1
--------------------------------------
/etc/bind/ddns.key  # even after giving permissions and access for bind and dhcp still the same error
Attached the config files for the reference please help to troubleshoot and fix, thanks in advance
dhcpconfig.txt
apparmor.d-usr.sbin.dhcpd.txt
namedconfig.txt
namedconfigoptions.txt
SOLUTION
Avatar of Steven Vona
Steven Vona
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Goutham

ASKER

thanks for the reply,  have posted below the permissions and user and group set as dhcp and bind for this file, but still I am getting the error, please help to resolve this issue
indar@lampsrv:/etc/bind$ pwd
/etc/bind
indar@lampsrv:/etc/bind$ ls -la
total 76
drwxr-sr-x  2 root  bind 4096 Jan  5 03:25 .
drwxr-xr-x 91 root  root 4096 Jan  5 04:08 ..
-rw-r--r--  1 root  root 2389 Dec 15 00:52 bind.keys
-rw-r--r--  1 root  root  237 Dec 15 00:52 db.0
-rw-r--r--  1 root  root  271 Dec 15 00:52 db.127
-rw-r--r--  1 root  root  237 Dec 15 00:52 db.255
-rw-r--r--  1 root  root  353 Dec 15 00:52 db.empty
-rw-r--r--  1 root  root  270 Dec 15 00:52 db.local
-rw-r--r--  1 root  root 3048 Dec 15 00:52 db.root
-rwxrwxrwx  1 dhcpd bind   81 Jan  5 01:39 ddns.key
-rw-rw-r--  1 dhcpd bind   52 Jan  5 01:18 Kddns-key.+157+58908.key
-rw-rw-r--  1 dhcpd bind  165 Jan  5 01:18 Kddns-key.+157+58908.private
-rw-r--r--  1 root  bind  463 Dec 15 00:52 named.conf
-rw-r--r--  1 root  bind  490 Dec 15 00:52 named.conf.default-zones
-rw-r--r--  1 root  bind 1136 Jan  5 02:34 named.conf.local
-rw-r--r--  1 root  bind  165 Jan  4 19:14 named.conf.localorg
-rw-r--r--  1 root  bind 1114 Jan  5 03:05 named.conf.options
-rw-rw-r--  1 dhcpd bind   77 Jan  4 19:02 rndc.key
-rw-r--r--  1 root  root 1317 Dec 15 00:52 zones.rfc1918
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Goutham

ASKER

Thank you very much, now dhcpd started but syslog is filled with message like unable to add forward map, attached for your reference , can you please help to troubleshoot and fix this
syslog-report.txt