From owner-freebsd-questions@FreeBSD.ORG Fri Nov 30 19:11:45 2007 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3622A16A41B for ; Fri, 30 Nov 2007 19:11:45 +0000 (UTC) (envelope-from david.robillard@gmail.com) Received: from rv-out-0910.google.com (rv-out-0910.google.com [209.85.198.187]) by mx1.freebsd.org (Postfix) with ESMTP id 0C31E13C45A for ; Fri, 30 Nov 2007 19:11:44 +0000 (UTC) (envelope-from david.robillard@gmail.com) Received: by rv-out-0910.google.com with SMTP id l15so2064096rvb for ; Fri, 30 Nov 2007 11:11:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:mime-version:content-type:content-transfer-encoding:content-disposition; bh=zzQPiPuNJZ3pCfT8hOl1kAAbezHRGvYmeGQ7eBQ6jCo=; b=GVDO00mrpacQoy1KQN8YYA/kxqm+4Pqq7KPYw15vj+BDgU6MzO0hY57f0e66BC2u+cP+AInzZ4xWCgevYw7shBK9WdPMad+uoJLXvyBGaRTSF5x67SPNJ+BolTmz+R924est9e8sv1rhRfr56/W5vjmvG1NsMFHHhO3+WdQ8w1s= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=received:message-id:date:from:to:subject:cc:mime-version:content-type:content-transfer-encoding:content-disposition; b=BqxJKltXo0fpBmvhQwa+egfaUneE207tN38kvB/lKnmX8SiadDIoZnvxPQHAjCMsebmEwN8nemaMnfyXnsQCMUSZKjRlBoF3XQAuQBamCFf3fnvagq+Vt6avw/gEyTQoEmxGM1XyIdXHhmREOI2f4azDsf0hw6AYZLUe+UMwxxU= Received: by 10.140.136.1 with SMTP id j1mr4209355rvd.1196449904238; Fri, 30 Nov 2007 11:11:44 -0800 (PST) Received: by 10.141.186.16 with HTTP; Fri, 30 Nov 2007 11:11:44 -0800 (PST) Message-ID: <226ae0c60711301111n39912b36qab8f79a9a38a7bfe@mail.gmail.com> Date: Fri, 30 Nov 2007 14:11:44 -0500 From: "David Robillard" To: freebsd@superhero.nl MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Cc: FreeBSD Questions Subject: Re: named.conf - unable to set control bit X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Nov 2007 19:11:45 -0000 >Hi list, > >I have got the following issue. I have added the following settings in >named.conf but am unable to get it working. If I read the man page it >seems that what I have put in is completely correct. > >REason to put it in is that I want the DHCP server to automatically update >the DNS zone. > >the error I get is: > >Nov 30 14:09:31 hulk named[6848]: reloading configuration failed: failure >Nov 30 14:09:45 hulk named[6848]: /etc/namedb/named.conf:20: expected >'allow' near ';' >Nov 30 14:09:45 hulk named[6848]: reloading configuration failed: >unexpected token > >head -n 25 /etc/named/named.conf ># generated with dnssec-keygen -a HMAC-MD5 -b 128 -n USER DHCP_UPDATER >key DHCP_UPDATER { > algorithm HMAC-MD5.SIG-ALG.REG.INT; > secret hashedstring==; > }; > >acl "home" {10.202.77.0/24;127.0.0.1;}; > >options { > // Relative to the chroot directory, if any > directory "/etc/namedb"; > pid-file "/var/run/named/pid"; > dump-file "/var/dump/named_dump.db"; > statistics-file "/var/stats/named.stats"; > allow-query {"home"; }; > >}; > >controls { > inet 127.0.0.1 port 953; >allow { 127.0.0.1;10.202.77.110; } keys { "DHCP_UPDATER"; }; >}; > >Line 20 is where controls start. > >Any help much appreciated. > >rgds, > >Patrick Patrick, When you update your named.conf file, make sure you run a syntax check before (re)starting named. Here's how you do it: named-checkconf /path/to/your/named.conf && echo $? If echo returns zero, then you're good to go. Otherwise, fix whatever problem is displayed. In your case, you need to remove one semi-colomn (";") to fix your problem. Here's what your control statement should look like: controls { inet 127.0.0.1 port 953 allow { 127.0.0.1;10.202.77.110; } keys { "DHCP_UPDATER"; }; }; Cheers, David -- David Robillard UNIX systems administrator & Oracle DBA CISSP, RHCE & Sun Certified Security Administrator Montreal: +1 514 966 0122