LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
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 09-13-2004, 03:00 AM   #1
emailssent
Member
 
Registered: Sep 2004
Posts: 312

Rep: Reputation: 30
DNS rndc service errror



#rndc start
rndc: connect failed : connection refused

why i am unable to start rndc services


for reference
#named.conf file

// generated by named-bootconf.pl


// secret must be the same as in /etc/rndc.conf
key "key" {
algorithm hmac-md5;
secret
"c3Ryb25nIGVub3VnaCBmb3IgYSBtYW4gYnV0IG1hZGUgZm9yIGEgd29tYW4K";
};

controls {
inet 127.0.0.1 allow { any; } keys { "key"; };
};


options {
pid-file "/var/run/named/named.pid";
directory "/var/named";
/*
* If there is a firewall between you and nameservers you want
* to talk to, you might need to uncomment the query-source
* directive below. Previous versions of BIND always asked
* questions using port 53, but BIND 8.1 uses an unprivileged
* port by default.
*/
// query-source address * port 53;
};

//
// a caching only nameserver config
//
zone "." IN {
type hint;
file "named.ca";
};

zone "localhost" IN {
type master;
file "localhost.zone";
allow-update { none;};
};


zone "0.0.127.in-addr.arpa" IN {
type master;
file "named.local";
};

// workaround stupid stuff... (OE: Wed 17 Sep 2003)
zone "ac" { type delegation-only; };
zone "cc" { type delegation-only; };
zone "com" { type delegation-only; };
zone "cx" { type delegation-only; };
zone "museum" { type delegation-only; };
zone "net" { type delegation-only; };
zone "nu" { type delegation-only; };
zone "ph" { type delegation-only; };
zone "sh" { type delegation-only; };
zone "tm" { type delegation-only; };
zone "ws" { type delegation-only; };
 
Old 09-13-2004, 05:50 AM   #2
maxut
Senior Member
 
Registered: May 2003
Location: istanbul
Distribution: debian - redhat - others
Posts: 1,188

Rep: Reputation: 50
run
rndc-confgen
it will generate some lines for /etc/named.conf and /etc/rndc.conf
remove older lines about secret key lines in these files. and copy and past new lines generated by rndc-confgen.

good luck
 
Old 09-13-2004, 07:58 AM   #3
emailssent
Member
 
Registered: Sep 2004
Posts: 312

Original Poster
Rep: Reputation: 30
After changing the keysercrets,

#rndc start
rndc: 'start' failed : not implemented
 
Old 09-13-2004, 10:53 AM   #4
maxut
Senior Member
 
Registered: May 2003
Location: istanbul
Distribution: debian - redhat - others
Posts: 1,188

Rep: Reputation: 50
can u start named? and check status?
/etc/init.d/named start
/etc/init.d/named status
or
rndc status

what is your disrto ?
 
Old 09-13-2004, 11:25 AM   #5
Pete M
Member
 
Registered: Aug 2003
Location: UK
Distribution: Redhat 9 FC 3 SUSE 9.2 SUSE 9.3 Gentoo 2005.0 Debian Sid
Posts: 657

Rep: Reputation: 30
emailssent

Is this Fedora ?

Copy /etc/rndc.conf to /var/named/chroot/etc/rndc.conf

Pete
 
Old 09-14-2004, 07:26 AM   #6
emailssent
Member
 
Registered: Sep 2004
Posts: 312

Original Poster
Rep: Reputation: 30
Quote:
emailssent

Is this Fedora ?

Copy /etc/rndc.conf to /var/named/chroot/etc/rndc.conf

Pete
no this is not fedora , it is mandrake 9.2

Quote:
can u start named? and check status?
/etc/init.d/named start
/etc/init.d/named status
or
rndc status

what is your disrto ?
yes i can start named but when i stop it says failed, that i can't stop it.

and i am using mandrake 9.2
 
Old 09-14-2004, 07:49 AM   #7
maxut
Senior Member
 
Registered: May 2003
Location: istanbul
Distribution: debian - redhat - others
Posts: 1,188

Rep: Reputation: 50
i dont know about mdk 9.2. if it uses bind with chroot support, u can follow Pete M's suggestions.

i think the trouble is rndc key. this key is neceesary for high security. if your key is wrong, rndc fails.
check your network configurtion too. if there is a trouble with your hostname, rndc can fail.
your hostname probably is assigned in /etc/sysconfig/network file.
and check if your $HOSTNAME is defined in /etc/hosts file also.
it must have some lines this:
Code:
127.0.0.1       yourhostname yourhostname.yourdomain.com localhost localhost.localdomain
good luck
 
Old 09-14-2004, 08:09 AM   #8
emailssent
Member
 
Registered: Sep 2004
Posts: 312

Original Poster
Rep: Reputation: 30
hostname is correctly set.

and for Pete M's suggestion i couldn't find and chroot directory under /var/named/ directory.
 
Old 09-14-2004, 09:31 AM   #9
maxut
Senior Member
 
Registered: May 2003
Location: istanbul
Distribution: debian - redhat - others
Posts: 1,188

Rep: Reputation: 50
so your bind works without chroot support.

i had same bind trouble with fedora and redhat distros. i always solved my trouble by regenerating keys.
try regenerate key, and copy past again. and try to restart named twice.
chek /var/log/messages if there is something wrong about bind or rndc.

good luck
 
Old 09-16-2004, 03:00 AM   #10
muongrua
LQ Newbie
 
Registered: Sep 2004
Location: Viet Nam
Posts: 1

Rep: Reputation: 0
Quote:
Originally posted by Pete M
emailssent

Is this Fedora ?

Copy /etc/rndc.conf to /var/named/chroot/etc/rndc.conf

Pete
Im using FC2, but I don't have directory /var/named/chroot. How can i create it ?.
 
Old 09-16-2004, 03:39 AM   #11
maxut
Senior Member
 
Registered: May 2003
Location: istanbul
Distribution: debian - redhat - others
Posts: 1,188

Rep: Reputation: 50
dont create it. if u have bind with chroot support, it will already create "chroot" directory automaticly. if u want bind with chroot support, install chroot rpm of bind.
 
Old 09-16-2004, 10:30 AM   #12
scowles
Member
 
Registered: Sep 2004
Location: Texas, USA
Distribution: Fedora
Posts: 620

Rep: Reputation: 31
controls {
inet 127.0.0.1 allow { any; } keys { "key"; };
};


So where is the port number defined in the above control statment for rndc to communicate with bind???
Example:

// ------------------------------------------------------------------------
// Only allow localhost access from rndc
// ------------------------------------------------------------------------
controls {
inet 127.0.0.1 port 953
allow { 127.0.0.1; } keys { "rndc-key"; };
};
 
Old 09-08-2006, 07:01 AM   #13
rha7dotcom
LQ Newbie
 
Registered: Feb 2006
Posts: 2

Rep: Reputation: 1
Thumbs up Finally Solved ...

After struggling a lot with this I got it solved this way...

rndc-confgen > /etc/rndc.conf

this generated something like:
/etc/rndc.conf
---------------------------------------------------
# Start of rndc.conf
key "rndc-key" {
algorithm hmac-md5;
secret "gibberish-gibberish";
};

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-md5;
# secret "same-gibberish-gibberish-as-above";
# };
#
# controls {
# inet 127.0.0.1 port 953
# allow { 127.0.0.1; } keys { "rndc-key"; };
# };
# End of named.conf
--------------------------------------------------------------------------

Then, I went to /etc/named.conf and replaced the include line for rndc.key with the last part (commented lines) of the rndc.conf file (obviously uncommented).

also, I copied /etc/rndc.conf to /var/named/chroot/etc.

restarted named, rndc start and vualá!

# rndc status
number of zones: 9
debug level: 0
xfers running: 0
xfers deferred: 0
soa queries in progress: 0
query logging is OFF
server is up and running



Hope this helps someone, eventually I figured it out, it just couldnt get a hold of the key file due to permissions, but whatever, I got it working...

Gabriel Medina.
 
1 members found this post helpful.
  


Reply


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
DNS problem rndc: connect failed connection refused error suchi Linux - Networking 14 05-27-2007 11:51 AM
DNS Problem - rndc: connect failed: connection refused krishvij Linux - Newbie 2 04-25-2005 07:40 AM
DNS, Bind, rndc update issue jujuman Linux - Networking 8 03-04-2005 09:02 AM
DNS proplem with rndc caocon Linux - Networking 5 10-21-2004 11:47 PM
service named error "rndc: conenct failed: connection refused" Reu Linux - General 1 07-12-2004 01:34 PM


All times are GMT -5. The time now is 06:20 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration