[BETA] DNS master2slave

I mentioned this to Jeff the last time I installed the software.

Looking to run the complete install around christmas.

regards

Jon
 
Thanks.

Since the programmer who wrote it for us has disappeared we're completely rewriting it and will soon issue a beta2.

Jeff
 
i'll be looking forward to the re-write. trying to install that rc6 version was a bit of a ball ache! couldn't get it to work in the end, i gave up and deleted it.

failing that, i'm fluent in perl, and i can maybe write something if i knew the logic behind the system. i kept getting errors trying to install the current version about various files missing, couldn't find the 'named' group, etc... running freebsd btw, bind runs under the group 'bind'. bind9 as well i think. i dunno if it was written for anything different.
also the master ip detection didn't work, as the place it went to look for the ip address doesn't exist on unix. ifconfig is the best bet of retrieving the master ip (along with any others, but it's usually the first ip that's the master address). or could even write a script to sit on a website so that an installed can poll a webpage and the script on the webpage returns the ip address that the request came from.
just a couple of ideas/suggestions anyway. if you need any help with any of it, give me a shout :)

dan
 
Thanks for your input.

Our current system is working for lots of people but we've run into a bug wherein occasionally it finds duplicates that don't exist.

And the programmer has disappeared :( .

So the rewrite, so far entirely in shell script form, is almost done.

Of course you're welcome to write your own, and either keep it for yourself or put it into the public domain as we did :) .

Jeff
 
Jeff: I know I already bugged you about something else, but it seems we're both interested in about the same things ;).

I've been thinking about starting a project that utilizes 1 or 2 servers that store zones in a mysql database, and use webservices to distribute those zones and generate the right configs for bind. That way you can add zones outside DA, and the duplicate problem might also be solved, as this can be solved at SQL query time.

What do you think about this idea?
Although, if we're going to do this, we'll most likely won't put everything into public domain...
 
Have you looked at the MyDNS project? We like it but we've never been successful in replicating MySQL across the public Internet.

Our project will always be Open Source, so anytihng you do will be what you do :) .

Jeff
 
Would this work, for example with this setup?

Server 1
1 IP
DA

Server 2
named only
2 IPs

So only one machine has DA, and the other just has named. Is it possible to use your program with this type of configuration?

Thanks!
 
Have you looked at the MyDNS project? We like it but we've never been successful in replicating MySQL across the public Internet.

Our project will always be Open Source, so anytihng you do will be what you do :) .

Jeff

I don't understand why you've never been successful replicating a MySQL db, as the build-in replication is quite easy to setup. I'm currently running MyDNS with 2 slave servers as replication slaves, which works perfectly. Now I'm considering using DA, but it would be VERY nice if I could still use MyDNS instead of BIND.

I personally think it's worthwhile supporting SQL for DNS.
 
I have an odd issue with the getzone.dns.sh. I have created the folder folder for namedftp in /var/www/html/. Edited the getzone.dns.sh (changing the typo) and run the files as nameftpd (and tried as root). The script takes the named.conf, renames it and places it in the /var/www/html/namedftp folder. The problem is that there is nothing in the file except the script heading "created by master2slave.dns" (or similar). None of the

I checked the paths to my named.conf were correct and have manually put in the nameservers ip address to the master ip address of the getzone.dns.sh file.

Deleted the previously created nameserver.named.conf file from /home/namedftp and /var/www/html/namedftp but on the second attempt receive the same results?

regards

Jon
 
I don't understand why you've never been successful replicating a MySQL db, as the build-in replication is quite easy to setup. I'm currently running MyDNS with 2 slave servers as replication slaves, which works perfectly. Now I'm considering using DA, but it would be VERY nice if I could still use MyDNS instead of BIND.
First note that using MyDNS is not a slam-dunk; you'd have to run some kind of system to import information from the MySQL zone files DA maintaines, and then you'd have to run replication to get the information over to the slaves.

When we tried MySQL replication (about a half year ago) we were successful in local networks but not across the Internet; it worked for a while, but usually failed within less than an hour. We discussed the issue with the author of the replication howto we found on the 'net (he's considered somewhat of an expert on replication) and he offered to help us for money, but he also wrote that replication was not designed to work over the 'net and probably wouldn't.
I personally think it's worthwhile supporting SQL for DNS.
That's a wide open statement. How? using MyDNS instead of BIND? BIND is the most popular DNS server on the 'net; much of the 'net runs on BIND. And while BIND doesn't directly support copying of zone names between masters and slaves, it supports zone import, which MyDNS does not; with MyDNS you've got to either get replication to work, or find some other way to replicate the databases on a continuous basis.

Neither MyDNS nor djbdns/tinydns (Dan Bernstein's suite) follow the RFCs as well as BIND, and continued study has made up my mind; we'll stick with BIND :) .

Jeff
 
The problem is that there is nothing in the file except the script heading "created by master2slave.dns" (or similar). None of the

I checked the paths to my named.conf were correct and have manually put in the nameservers ip address to the master ip address of the getzone.dns.sh file.

Deleted the previously created nameserver.named.conf file from /home/namedftp and /var/www/html/namedftp but on the second attempt receive the same results?
I don't know why you're having the problem. Do you have a BIND configuration file at /etc/named.conf?

That's the only reason I can think of.

Jeff
 
problem resolved

The problem was that I had my zone files in this format:

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

instead of

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

Changed the format and it works.

Jon

p.s This was on a non directadmin server.
 
Hmmm... I thought it was setup so it would work that way. We're rewriting the entire project and we'll have to test the new version more thoroughly.

Thanks for bringing it to my attention.

Jeff
 
Problems

Hi jeff...

Consecutive to your post regarding master2slave, i have been testing it and installed it on master server...

When checking, installation on master server, su - namedftp -c './getzone.dns.sh'

i get this error in var/log/messages :

Jan 22 09:52:00 da8167 su(pam_unix)[3723]: session opened for user namedftp by root(uid=0)
Jan 22 09:52:00 da8167 su[3723]: Warning! Could not relabel /dev/pts/1 with user_u : object_r:devpts_t, not relabeling.Opération non permise (in english, operation not permitted)
Jan 22 09:52:00 da8167 su(pam_unix)[3723]: session closed for user namedftp

what's happening exactly ???
 
Last edited:
Hmmm... I thought it was setup so it would work that way. We're rewriting the entire project and we'll have to test the new version more thoroughly.

Thanks for bringing it to my attention.

Jeff

No problem. Do you have an eta on the new release?

Jon
 
tdldp,

I don't know why you have the problem.

To run this manually as a test:
Code:
# su - namedftp
$ ./getzone.dns.sh
and see if you get the same errors.

Be sure to run it from the directory where getzone.dns.sh is installed.

Jeff
 
Back
Top