LinuxQuestions.org
Visit Jeremy's Blog.
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-22-2005, 12:04 AM   #1
a_balcombe
LQ Newbie
 
Registered: Aug 2005
Posts: 3

Rep: Reputation: 0
Dns Server


I had DNS services running on LINUX version 9.0, however i did a /usr/sbin/rndc stop i am trying to restart the service now but i am getting an error "rndc: connect failed connection refused"

Is there any way i can restart
 
Old 08-22-2005, 01:40 AM   #2
rhoekstra
Member
 
Registered: Aug 2004
Location: The Netherlands
Distribution: RedHat 2, 3, 4, 5, Fedora, SuSE, Gentoo
Posts: 372

Rep: Reputation: 42
RedHat 9.0? SuSe 9.0? Mandrake 9.0? There is no LINUX 9.0...

Anyway, this tells me that your dns server configuration (config file mostly /etc/named.conf) has no entry for rndc (remote named daemon control), so it doesn't listen on its control port.

Either bring that up, or you can try (as root) something as '/etc/init.d/named stop; /etc/init.d/named start', depending on how the start / stop script is called on the distro you are using.

If you are using your system graphically, there is most likely a system administration program like 'services' which lets you stop and start services on the machine.

Good luck.
 
Old 08-22-2005, 03:36 AM   #3
cdhgee
Member
 
Registered: Oct 2003
Location: St Paul, MN
Distribution: Fedora 8, Fedora 9
Posts: 513

Rep: Reputation: 30
As I understand it rndc only works when the server is already up and running to listen to rndc commands. If it's stopped, you'll have to restart it thus:

Code:
service named start
(Which incidentally is effectively the same as doing what rhoekstra suggested - although in Fedora at least (and so I guess also in RedHat 9), the service scripts are kept in a slightly different location, so you'd need to do

Code:
/etc/rc.d/init.d/named start
 
Old 08-22-2005, 05:39 AM   #4
a_balcombe
LQ Newbie
 
Registered: Aug 2005
Posts: 3

Original Poster
Rep: Reputation: 0
Quote:
Originally posted by rhoekstra
RedHat 9.0? SuSe 9.0? Mandrake 9.0? There is no LINUX 9.0...

Anyway, this tells me that your dns server configuration (config file mostly /etc/named.conf) has no entry for rndc (remote named daemon control), so it doesn't listen on its control port.

Either bring that up, or you can try (as root) something as '/etc/init.d/named stop; /etc/init.d/named start', depending on how the start / stop script is called on the distro you are using.

If you are using your system graphically, there is most likely a system administration program like 'services' which lets you stop and start services on the machine.

Good luck.
Ok i stop the named service and started again, it said ok, however i am still getting the original erraor when i try to use the RNDC command, you mention about the dns server configuration file not having no entry for the RNDC what should it look like.

Thanks.
 
Old 08-22-2005, 07:19 AM   #5
scowles
Member
 
Registered: Sep 2004
Location: Texas, USA
Distribution: Fedora
Posts: 620

Rep: Reputation: 31
Type: man rndc-confgen

The -a command line argument should get you started in the right direction to solving your problem.
 
Old 08-22-2005, 02:48 PM   #6
a_balcombe
LQ Newbie
 
Registered: Aug 2005
Posts: 3

Original Poster
Rep: Reputation: 0
I tried the RNDC-CONFGEN -A option but still i am getting the initial error messages with rndc, i must admit i am not too much an expert at linux.
 
Old 08-23-2005, 01:24 AM   #7
rhoekstra
Member
 
Registered: Aug 2004
Location: The Netherlands
Distribution: RedHat 2, 3, 4, 5, Fedora, SuSE, Gentoo
Posts: 372

Rep: Reputation: 42
Is it necessary to use rndc?? Your initial question was how to restart the name server, if rndc wasn't working. We all responded with a solution.

But if you still incist you want rndc to work, here's the deal:
I assume you are using RedHat 9.0, as you haven't answered my initial question; no problem, but the locations and files could differ.

in /etc/rndc.conf you put
Code:
options {
        default-server  localhost;
        default-key     "rndckey";
};

server localhost {
        key     "rndckey";
};

include "rndc.key";
in rndc.key you put something like:
Code:
key "rndckey" {
        algorithm       hmac-md5;
        secret "5VwftiOHyTGHiN"; // BEWARE, this key is cripled, you'd have to create your own!
};
and in /etc/named.conf you should include something as:
Code:
controls {
  inet 127.0.0.1 allow { localhost; } keys { rndckey; };
};

include "/etc/rndc.key";
This case your named server is told to listen to control commands from localhost, identified by the key from rndc.key. This key file is in turn used by rndc to encrypt his commands.

To create your own rndc key with rndc-confgen, and check if you have similar results in the config files as I have shown above..

Good luck.
 
  


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 client cannot resolve on dns server jtvillegas Linux - Software 3 03-12-2016 03:30 PM
help needed to setup a DNS server can anyone say how to configure a DNS server subha Linux - Networking 4 04-27-2012 11:50 PM
How the DNS-server is connected to work of a web-server and a mail-server? ukrainet Linux - Newbie 2 01-10-2005 09:18 PM
Do I leave primary and seconday DNS blank for a DNS Server? imsam Linux - Networking 3 10-25-2004 01:48 PM
need help to set up caching only dns server to with bogus DNS entries ullas Linux - Networking 1 10-28-2003 01:54 PM

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

All times are GMT -5. The time now is 10:24 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