LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
Search this Thread
Old 01-01-2006, 07:27 PM   #1
joelhop
Member
 
Registered: Mar 2004
Location: Pennsylvania::USA
Distribution: Fedora Core 6
Posts: 100

Rep: Reputation: 15
Question Bind (DNS) management via web interface.


I've got 2 dns servers running redhat 9 / Bind to provide DNS services to my network. I've been managing DNS entries manually on the master server by editing the zone files and named.conf in a text editor. This works fine for me, but the suits would like an easier preferably web based DNS manager installed on the server. Is there a good premade package for this, or is this something I will need to write?

-Thanks KARL
 
Old 01-01-2006, 09:57 PM   #2
homey
Senior Member
 
Registered: Oct 2003
Posts: 3,057

Rep: Reputation: 56
Webmin works quite well for me.
 
Old 01-02-2006, 07:15 PM   #3
bentz
Member
 
Registered: Mar 2003
Distribution: Fedora, Mac OSX
Posts: 362

Rep: Reputation: 30
smbind

I've written some software on sourceforge that allows you to both manage your bind DNS records in MySQL as well as use a PHP web interface to modify and push them using rndc reload (hot updating) and error checking with named_checkzone.

http://smbind.sourceforge.net/
http://sourceforge.net/projects/smbind
 
Old 01-02-2006, 09:22 PM   #4
deadhead
LQ Newbie
 
Registered: Oct 2003
Distribution: Debian 'Woody"
Posts: 24

Rep: Reputation: 15
i recommend webmin too, it has a very nice interface for DNS management, and it is written in Perl
 
Old 01-03-2006, 06:30 AM   #5
bentz
Member
 
Registered: Mar 2003
Distribution: Fedora, Mac OSX
Posts: 362

Rep: Reputation: 30
Webmin's great, unless the suits log in and realize that they can do everything- from managing firewall rules to bringing down SSH. Save, of course, you configure a special webmin user that's restricted only to the bind module.

I've run into the same problem at my company, and found that using Webmin was too much of a security risk and was really more than we wanted exposed via the web. Webmin is perfect for those who don't have the time or experience for more robust solutions.

And just to stay non-partisan, there are other software packages from Mice & Men and on SourceForge (like Dixie and NovaDNS and ProBIND - although a few of these either require cron jobs or are several years old) that will administer DNS without administering the whole box.
 
Old 01-03-2006, 11:55 AM   #6
joelhop
Member
 
Registered: Mar 2004
Location: Pennsylvania::USA
Distribution: Fedora Core 6
Posts: 100

Original Poster
Rep: Reputation: 15
Smile Thanks!

Excellent, thank you for all your posts. I definitely have a good idea of what I'm getting into now.
 
Old 01-04-2006, 02:00 PM   #7
joelhop
Member
 
Registered: Mar 2004
Location: Pennsylvania::USA
Distribution: Fedora Core 6
Posts: 100

Original Poster
Rep: Reputation: 15
I am trying to install smbind. Everything looks good in the config test:

http://x.x.x.x/configtest.php

smbind configtest

This script will try to check some aspects of your smbind configuration and point you to errors where ever it can find them. You need to edit config.php and read the INSTALL file first before you run this script.
Testing config.php...OK
Testing PEAR DB...OK
Testing Smarty...OK
Testing templates_c...OK
Testing path...OK
Testing conf directory...OK
Testing conf file...OK
Testing named-checkconf...OK
Testing named-checkzone...OK
Testing rndc...OK
Testing rndc execution...OK
server is up and running
Testing database connection...OK
Testing database SELECT from zones table...OK Testing database SELECT from users table...OK Testing database SELECT from records table...OK
Testing database INSERT into zones table...OK Testing database INSERT into users table...OK Testing database INSERT into records table...OK
Testing database UPDATE zones table...OK Testing database UPDATE users table...OK Testing database UPDATE records table...OK
Testing database DELETE FROM zones table...OK Testing database DELETE FROM users table...OK Testing database DELETE FROM records table...OK

Congratulations, your setup looks good. Please remember to add the following line to your named.conf:
include "/etc/smbind/smbind.conf";

However, when I just try to navigate to the actual smbind interface http://x.x.x.x

I get this error:

Fatal error: Call to undefined function: set_include_path() in /var/www/html/include.php on line 24

I'm thinking I must have the wrong version of php, or need additional packages or something, any ideas?

I'm running, a Redhat 9 system with php-4.2.2-17 installed.

Thanks,
KARL
 
Old 01-04-2006, 02:08 PM   #8
joelhop
Member
 
Registered: Mar 2004
Location: Pennsylvania::USA
Distribution: Fedora Core 6
Posts: 100

Original Poster
Rep: Reputation: 15
Smbind Problem

I believe the error is due to the set_include_path()function only being present in php versions 4.3.0 and greater. I am having trouble finding/installing an rpm for php-4.3.0 for redhat 9. Any hints?

-KARL
 
Old 02-15-2006, 09:38 AM   #9
joelhop
Member
 
Registered: Mar 2004
Location: Pennsylvania::USA
Distribution: Fedora Core 6
Posts: 100

Original Poster
Rep: Reputation: 15
Thumbs up SMBIND Passwords

Do you know where the SMBIND software package stores it's users and passwords to log into the GUI? If the admin password were to be lost, where could it be changed or reset in the backend instead of in the SMBIND GUI?

-Thanks Karl


I've written some software on sourceforge that allows you to both manage your bind DNS records in MySQL as well as use a PHP web interface to modify and push them using rndc reload (hot updating) and error checking with named_checkzone.

http://smbind.sourceforge.net/
http://sourceforge.net/projects/smbind[/QUOTE]
 
Old 02-15-2006, 09:54 AM   #10
bentz
Member
 
Registered: Mar 2003
Distribution: Fedora, Mac OSX
Posts: 362

Rep: Reputation: 30
Hey joelhop,
I don't know why I didn't get emailed about your other posts, but I apologize for being unresponsive. Did you figure out your issue with set_include_path()? That's not an issue I've ever seen before, but I have gotten the smbind to work with Red Hat 9...

Fortunately, your question about the lost username and password info is easier to answer... if you can access the MySQL database from the command line, poke around in the "users" table.

From here, you can add a new admin user by hand to restore access to the GUI:
insert into users (username, password, admin) values ('newadmin', md5('password'), ('yes');

i.e. Username: newadmin, Password: password

or, you can reset a password for an existing account:
update users set password=md5('newpassword') where user='admin';
 
Old 03-30-2006, 02:39 AM   #11
drl
LQ Newbie
 
Registered: Mar 2006
Posts: 5

Rep: Reputation: 0
Hi Bentz,

Great work on smbind. I have a question. After adding my first zone and commiting changes, I notice it updates the file smbind.conf. By default,
the layout looks like this:-

zone "zone.com" {
type master;
file "zone.com";
};

This looks normal. What happens is when BIND is restarted, it is unable to locate zone.com. In config.php, 'path' and 'conf' is set to the following:

$_CONF['path'] = "/var/named/db/";
$_CONF['conf'] = "/var/named/smbind.conf";

If I add a new zone and commit changes, smbind creates the zone in /var/named/db/zone.com and updates smbind.conf. But when BIND is restarted via rndc, it looks for zone.com in /var/named/ instead, causing the following error message to appear in syslog:

named[730]: zone zone.com/IN: loading master file zone.com: file not found

Is there a way to fix this ?

Thanks in advance.
Darryl

Last edited by drl; 03-30-2006 at 03:32 AM.
 
Old 03-30-2006, 06:04 AM   #12
bentz
Member
 
Registered: Mar 2003
Distribution: Fedora, Mac OSX
Posts: 362

Rep: Reputation: 30
Hey there Darryl,
Thanks for checking out smbind.

I'm going to take a wild guess and say that there's a mismatch between the directory you've specified in named.conf and the directory you've specified in smbind.conf.

Open up /etc/named.conf (or where ever it's located on your system) and check out the options{}; section's directory specification. This location tells named to look in this path for all unqualified-pathed zone files. As you might imagine, if you're using $_CONF['path'] = "/var/named/db/"; for smbind, you have to use options { directory "/var/named/db"; }; in named.conf so that they're consistent.

You may have some pre-canned zone files for 0.0.127.in-addr.arpa or localhost or hints that specify where your zone files are; you'd want smbind to point to this same place.

Also, you might want to run through the configtest.php script to make sure all the permissions appear correct, and that apache can write to /var/named/db to create your zone file when you click the Commit link.
 
Old 03-30-2006, 08:57 AM   #13
drl
LQ Newbie
 
Registered: Mar 2006
Posts: 5

Rep: Reputation: 0
Hi Bentz,

You were right. I've made the necessary changes to config.php and named.conf and now everything works. The changes were:

config.php
$_CONF['path'] = "/var/named/db/";
$_CONF['conf'] = "/var/named/smbind.conf";

named.conf:
options { directory "/var/named/db"; };

named.root and localhost both reside in /var/named/ and I had to adjust them to look like:

zone "." {
type hint;
file "../named.root";
};

zone "localhost" {
type master;
file "../localhost.db";
};

and finally:

include "../smbind.conf";

Would be neat though if there's a feature to control smbind.conf from the interface. Thanks again very much.

-- Darryl

P/S: For those who are getting errors about php's session_start() , try installing php4-session and php4-mysql extension and restart apache.

Last edited by drl; 03-30-2006 at 09:11 AM.
 
Old 03-30-2006, 09:13 AM   #14
bentz
Member
 
Registered: Mar 2003
Distribution: Fedora, Mac OSX
Posts: 362

Rep: Reputation: 30
Glad to hear everything's working now!

Regarding your note about php4-session and php4-mysql, which particular distribution/package system are you using that has this problem?
 
Old 03-30-2006, 09:25 AM   #15
drl
LQ Newbie
 
Registered: Mar 2006
Posts: 5

Rep: Reputation: 0
Hi Bentz,

"Regarding your note about php4-session and php4-mysql, which particular distribution/package system are you using that has this problem?"

I'm using the following distribution/packages:

OS:
FreeBSD 5.5-PRERELEASE
FreeBSD 6.0-STABLE


Packages:-

Apache:
apache-1.3.34_4

MySQL:
mysql-server-5.0.19

PEAR:
pear-1.4.6
pear-DB-1.7.6,1

PHP4:
php4-4.4.2_1
php4-mysql-4.4.2_1
php4-pcre-4.4.2_1
php4-session-4.4.2_1
php4-xml-4.4.2_1

- Darryl

Last edited by drl; 03-30-2006 at 09:27 AM.
 
  


Reply

Tags
gnu


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
ssh forwarding : bind to a specific interface flupke Linux - Networking 9 12-09-2011 05:24 PM
GUI/Web Interface for BIND 9 Kholnuu Linux - Software 4 02-21-2005 02:24 PM
rsyncd bind to a interface Greenpie Linux - Networking 1 10-22-2004 07:34 AM
Is Management interface detected by Solaris ? markraem Solaris / OpenSolaris 1 07-06-2004 07:40 PM
DNS BIND and Apache web server divineutm Linux - Newbie 1 03-25-2004 02:29 AM


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