LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   Replicating Bind 9 between Windows 2008 and CentOS 5.7 (https://www.linuxquestions.org/questions/linux-server-73/replicating-bind-9-between-windows-2008-and-centos-5-7-a-930761/)

MDCDomains 02-22-2012 04:40 PM

Replicating Bind 9 between Windows 2008 and CentOS 5.7
 
Hello,

This is my first post, so hopefully it proves a successful one! I recently have moved my Web/Email hosting to a managed server environement. I am migrating my Windows 2003 Server to the two Hosted Servers listed below:

Main Server
Windows Server 2008 R2
Parallels Plesk 10.4
SmarterMail 8.x
IIS7
BIND9

Backup Server
CentOS 5.7
Webmin 1.580
BIND9

My Question: There has to be a way to replicate the DNS between my two servers, no? Our current process is to setup new webhost customers on our Main Plesk Server, this will be our Primary DNS server. I would like to have the Main Server push the DNS records to the BIND9 server on the backup server and have my backup dns record point to it. Is this possible? If so, how?

I asked the company that is managing my servers if this can be done and here is their response :

"That would require a cron job that fires off from your webserver to your backup server, rsyncing the zone file path from each server.

This would require a developer to write the cron job as that is past what our technical support will provide."


I am rather new to Linux, but am picking it up pretty quickly. Any help or insight is greatly appreciated.

Regards,
MDCDomains Admin

rhbegin 02-22-2012 05:03 PM

I am very sketchy on Windows DNS on 2008, running on vCenter servers.

(In RHEL5 you can install system-config-bin package along with X windows)
yum groupinstall "X Window System"
yum install bind bind-chroot system-config-bind
(exit your shell)
then log in with:

ssh -X user@yourserver (to export the X environment)

then run system-config-bind (and it will create a skeleton config I learned from the RHCE course).

system-config-bind is no longer available in RHEL6

****NOTE you will need a symlink from /var/named/chroot/etc/named.conf to /etc****



However, it should work the (not sure how Windows Server 2008) handles access control list, but it will need to have the ip of the CentOS bind server in it for it to receive zone file transfers.

I have 2 bind dns servers master & slave, the acl's on the primary include the ip addresses of the secondary.
You do not want recursion on the secondary.

also I added this stanza to be rid of all of the unwanted log traffic from lame servers

logging {
category lame-servers { null; };
};


Your W2k8 server once it allows the secondary slave server, configure you CentOS box with slave zone files.
It will automatically refresh the zone files without having to run cronjobs.

If you make changes on the primary DNS server, you can configure (rndc) on your secondary and do a refresh on the specific zone file.

/var/named/chroot/etc

in your named.conf

your zone files will be in:
/var/named/chroot/var/named

all of your listen on, acl's and your zone references from your master will all have 'slave' in the config.

Not too familiar with verbose logging on w2k8 dns, however watch your logs on centos and once you get your config in place run:


named-checkconf /etc/named.conf --> if no data output then no syntax errors


also

service named configtest
handy for diags

you can turn on query logging in bind as well, every query that comes in will write out to the log file, (YOU do not want to leave this on).

I can remove files from the secondary/slave server (zone files) and upon restarting named it does zone transfers recreating them.

Don't forget about updating your serial numbers on your primary when you do changes so the secondary will reflect the changes on zone transfers.

MDCDomains 02-23-2012 12:49 PM

OK,I should have said I had no knowledge at all! Alot of what you just wrote seems greek to me. Looks like you know your stuff well though. Are there walkthroughs i could follow for this?

Regardless, Thanks for the information

rhbegin 02-23-2012 02:47 PM

Here is a link that will help out:

http://blog.wains.be/2007/12/13/cent...dns-with-bind/

http://www.centos.org/docs/5/html/De...S/ch-bind.html

http://www.lamolabs.org/blog/282/how...r-on-centos-5/

These links are good, I would use the bind-chroot.

also put in the lame-servers stanza to keep the rubbish out of your log files


All times are GMT -5. The time now is 08:31 PM.