LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 10-23-2008, 09:39 AM   #1
matters
Member
 
Registered: May 2007
Distribution: Slackware
Posts: 281

Rep: Reputation: Disabled
rc.bind stop gives problem


This is what i get :

Code:
root@parade:/var/named/chroot/etc# /etc/rc.d/rc.bind restart
Stopping BIND:  /usr/sbin/rndc stop
rndc: connection to remote host closed
This may indicate that
* the remote server is using an older version of the command protocol,
* this host is not authorized to connect,
* the clocks are not syncronized, or
* the key is invalid.
Using killall named on additional BIND processes...
Starting BIND:  /usr/sbin/named -u named -t /var/named/chroot -c /etc/named.conf
root@parade:/var/named/chroot/etc# netstat -ntlp |grep 953
tcp        0      0 127.0.0.1:953           0.0.0.0:*               LISTEN      3460/named
root@parade:/var/named/chroot/etc# /etc/rc.d/rc.bind stop
Stopping BIND:  /usr/sbin/rndc stop
rndc: connection to remote host closed
This may indicate that
* the remote server is using an older version of the command protocol,
* this host is not authorized to connect,
* the clocks are not syncronized, or
* the key is invalid.
Using killall named on additional BIND processes...
root@parade:/var/named/chroot/etc# netstat -ntlp |grep 953
root@parade:/var/named/chroot/etc#
this is what rc.bind restart gives

Code:
root@parade:/var/named/chroot/etc# /etc/rc.d/rc.bind restart
Stopping BIND:  /usr/sbin/rndc stop
rndc: connect failed: 127.0.0.1#953: connection refused
Starting BIND:  /usr/sbin/named -u named -t /var/named/chroot -c /etc/named.conf
root@parade:/var/named/chroot/etc# netstat -ntlp |grep 953
tcp        0      0 127.0.0.1:953           0.0.0.0:*               LISTEN      3496/named
root@parade:/var/named/chroot/etc#
As u can see when i say stop ports 953 and 53 is no longer listening as it should and on restart they are listening again.
What might cause error messages?



Thanks!
 
Old 10-23-2008, 11:31 AM   #2
matters
Member
 
Registered: May 2007
Distribution: Slackware
Posts: 281

Original Poster
Rep: Reputation: Disabled
this is what fixed the problem

3 steps to solve our problem


1. we create a new key using below ONE line bash command
first
cd /etc

now create the new nameserver key rndc-key which by default is saved to the file named rndc.key THIS folder.


rndc-confgen -b 512 | grep -m 1 "secret" | cut -d '"' -f 2


the output in your shell will be something like below BUT longer !

KgX0x/KFDE9Ylzq7JAbGs==

at the same time the new rndc.key is generated -- check for time stamp using
ls -la rndc.key for verification


2. step

in your
/etc/named.conf
you should have two entries OUTSIDE your "options" as below - one for

controls

another one for

key "rndc-key"

hence here below the full content you either have or need to add to your named.conf

------------- quote

controls {
inet 127.0.0.1 allow { localhost; } keys { rndc-key; };
};

key "rndc-key" {
algorithm hmac-md5;
secret "here BETWEEN the 2 double-quotes - you copy and paste your initially generated key as shown in your shell - NOT the content of your rndc.key file !!";
};

------------- unquote


3. step

now we look at your

rndc.conf file

which should read

------- quote

# Start of rndc.conf
key "rndc-key" {
algorithm hmac-md5;
secret "here again you copy and paste the shell output of your generated rncd-key";
};

options {
default-key "rndc-key";
default-server 127.0.0.1;
default-port 953;
};

------- unquote

another attempt to restart your name-server bind9 should be successful

but first we want to TEST out named.conf configuration using the tool available from the bind9 package.

in your shell enter

named-checkconf

the output is self-explaining and detailed if you have any syntax error

rcnamed restart
Shutting down name server BIND done
Starting name server BIND done

in case anyone else occurs
 
  


Reply



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
Bind problem: config files are missing after re-install bind 9.5 on Fedora Core 8 elvisious Linux - Software 1 07-15-2008 07:49 PM
Can I bind to a serial port using BIND Socket API?? venkat_p257 Linux - General 2 12-04-2007 05:49 AM
Bind 9.3.2 problem achilles Linux - Server 1 05-07-2007 12:25 PM
BIND problem 70mas Linux - Software 1 12-27-2006 04:08 PM
bind problem hansi umayangan Linux - Newbie 1 02-28-2005 10:42 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 01:43 AM.

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