LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 11-06-2007, 05:36 AM   #1
TylerD75
Member
 
Registered: Aug 2004
Location: Norway
Distribution: Gentoo
Posts: 96

Rep: Reputation: 18
Bind and rndc problems!! How do I remove rndc?


Hi!

I've now repeatedly had serious problems with rndc and bind! If I restart the server, everything works fine (for a while), but I am unable to restart the server with either "rndc -s localhost stop/start" or "/etc/init.d/named restart".
In my bind log I get "bad auth" and the typical message appears on screen: "Something about wrong protocol etc..."

I've tried ALL the tips out there, but nothing is working.
And since this dns server is on my own local LAN (with no unautorized traffic), I want to remove ALL references to rndc!
It might be working for some of you, but it breaks my dns server every month, and then I'm back searching for solutions...

I'm using gentoo, so is there a way I can emerge with a USE flag to remove rndc control? Or is there a way to compile bind manually without rndc control? Or is it as simple as removing all references to rndc in the .conf files? (I believe I've tried the latter without success).

I just need a way to remove RNDC as the source of my nightmares!
I know I can use other DNS servers, but that's not an option! (As I'm dependant on the BIND structure for other scripts/programs.)

Cheers!
 
Old 11-06-2007, 06:26 AM   #2
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,174
Blog Entries: 1

Rep: Reputation: 2040Reputation: 2040Reputation: 2040Reputation: 2040Reputation: 2040Reputation: 2040Reputation: 2040Reputation: 2040Reputation: 2040Reputation: 2040Reputation: 2040
I don't think that you can compile bind from source without rndc.
You can disable rndc using:
Code:
controls { };
in /etc/named.conf
If you want you can comment out any other reference to rndc, but it's not important.

Regards
 
Old 11-06-2007, 08:24 AM   #3
TylerD75
Member
 
Registered: Aug 2004
Location: Norway
Distribution: Gentoo
Posts: 96

Original Poster
Rep: Reputation: 18
Lol!

Thanks m8! I owe you one!
Hmm... that simple...

Now I can at least get "rndc -s localhost status" to work.
But one problem remains: I have to physically restart the server to restart bind.

How can I setup things to restart the usual way? (like: "/etc/init.d/named restart")

If I try "rndc -s localhost reload" or whatever, I get "connection refused"...

And if I do "ps auxww | grep named" + kill -9 pid + remove the pid file, I still get "Named is already running" when I try to start it...

Cheers!
 
Old 11-06-2007, 08:50 AM   #4
TylerD75
Member
 
Registered: Aug 2004
Location: Norway
Distribution: Gentoo
Posts: 96

Original Poster
Rep: Reputation: 18
Ahhh....

Seems like I found the problem that has been haunting me for all this time!

I was missing my server definition in the rndc.conf:
Code:
server localhost {
  key "rndckey";
};
This caused the server to run properly, but left me unable to control it!

I find this a bit strange though, cause I have gone through all the documentation I could find. Plus I've posted my config files numerous times on several forums, but no one else has seen it either...

Well, at least it is working now!
C'ya in a month or so
 
Old 01-06-2010, 08:40 AM   #5
einangen
LQ Newbie
 
Registered: Sep 2009
Location: Hammerfest, Norway
Distribution: Gentoo
Posts: 1

Rep: Reputation: 0
Another possible solution to this problem:

I had something that seemed exactly like this problem today.

I have two separate servers, serving their separate sites, at separate physical location. Actually, the only thing they have in common, is their administrator (me) and OS (Gentoo Linux).

As I have only one public IP at each of these sites, and need two physically independent servers to be able to handle my DNS for either site in a regulatory fashion, these sites are going to be master and slave DNS servers for each other. You get the picture.

They have both run Bind9 from the start, but not properly set up with primary and secondary zones and zone transfers.

Today, I was not able to _stop_ named without using 'killall named'. I found this thread here, tried that, didn't work. However, while trying desperately to find out what was wrong, somewhere in the logs, I got an error concerning user rights. I checked, and found that somewhere along the line, ownership of most of the files in /chroot/dns/etc/bind/ were set to root.root, not named.named.

I ran 'chown named.named -R /chroot/dns/etc/bind/*', and everything seemed a lot better.

And i got a bonus as well, since I learned a bit more about securing the server with rndc-keys. Thanks, and I hope this can help others as well.
 
  


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 rndc not work:"rndc: connect failed: timed out" echox Linux - Server 3 11-07-2020 09:36 AM
Bind 9 rndc connection refused. 360 Linux - Networking 2 10-15-2010 02:47 PM
rndc works, but rndc stats doesnt havok1977 Linux - Networking 2 04-08-2010 03:18 PM
Bind | rndc.key the_gripmaster Linux - Server 1 05-04-2007 07:00 AM
BIND/rndc Question m3kgt Linux - Networking 2 12-12-2003 03:53 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 12:40 PM.

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