Cancelado

Sync zone records from Bind(Linux) to Windows 2008(Primary and Secondary) boxes.

We need a way to sync DNS zone records from Bind(Linux) to Windows 2008 DNS boxes(2 servers in Primary(NS1) and Secondary DNS(NS2) configuration).

Following is what needs to happen:

1. On Bind(Linux) box, a DNS zone will be created. Zone transfers(allow-notify, allow-transfer) are allowed for both Primary(NS1) and Secondary(NS2) Windows boxes.

2. A process instructs Zone creation on both NS1 and NS2 boxes.

On NS1 - dnscmd /zoneadd ZONENAME /primary /file [url removed, login to view] /load

On NS2 - dnscmd /zoneadd ZONENAME /secondary MasterIPAddress

3. And on zone deletion from Linux(Bind) box, these zones should be removed from Primary(NS1) and Secondary(NS2).

We understand that zone transfers can be enabled in Bind and on Windows boxes, we can manually create the zone and then request for zone update. But we want the zone creation process to be automated on Windows boxes.

A possible way is to copy zone files from /var/named/*.db on Bind(Linux box) and copy it to C:\temp on (NS1) and then perform step mentioned in 2nd point.

I am open to any suggestions you have to work this out efficiently if there's a better way.


I'll try to split the actions with a scenario that I've tested:
Linux(Bind) - Master server where zone records are present, configured to allow zone transfers to NS1.
NS1 - Primary nameserver (This is a Slave server which gets the records from Linux)
NS2 - Secondary nameserver (This is a Slave server which gets the records from NS1)
dns-script1 - dns script on NS1.
dns-script2 - dns script on NS2.

1. On domain(ZONENAME) creation on Linux server, a file /var/named/ZONENAME.db is generated.
2. On NS1, dns-script1 is scheduled to run after every 3 minutes.
- dns-script1 uses sftp(portable winscp) to connect to the Linux Server to get list of all the *.db files there. This list is stored in C:\temp\dnslist. If C:\temp\dnslist already exists, then it is moved to C:\temp\dnslist.last before performing previous operation.
- Then a loop runs reading through C:\temp\dnslist checking if the ZONENAME exists in DNS. If not, fire:
dnscmd /zoneadd ZONENAME /secondary IP-OF-LINUXServer # Add ZONENAME to the server.
dnscmd /zonerefresh ZONENAME # Initiate zone records transfer from the BIND server.
dnscmd /zoneresetsecondaries ZONENAME /securens IP-OF-NS2 # Allow NS2 to ask for zone transfers.
- Finally we compare C:\temp\dnslist and C:\temp\dnslist.last and store the result in C:\temp\dnslist_removed. These are zones which are then removed using:
dnscmd /zonedelete ZONENAME /f
3. On NS2, dns-script2 is scheduled to run after every 3 minutes.
- Uses the aforementioned process to create zone list C:\temp\dnslist and before doing that check if C:\temp\dnslist exists, move it to C:\temp\dnslist.last.
Then a loop runs reading through C:\temp\dnslist checking if the ZONENAME exists in DNS. If not, fire:
dnscmd /zoneadd ZONENAME /secondary IP-OF-NS1 # Add ZONENAME to the server
dnscmd /zonerefresh zonename # Initiate zone records transfer from NS1.
- Finally we compare C:\temp\dnslist and C:\temp\dnslist.last and store the result in C:\temp\dnslist_removed. These are zones which are then removed using:
dnscmd /zonedelete ZONENAME /f

There is a reason why I'm inclined to using these three different files:
dnslist.last - contains the zone records which were last fetched
dnslist - contains the records fetched for this run
dnslist_removed - contains difference of both the above lists to note which domain has been removed from the Linux box.

The reason is that the Windows boxes(NS1, NS2) are housing some zones already which do not exist(are independent) on the Linux Server. So we need to ensure that we only delete zones which were once on the Linux box and then were deleted. And the approach that I have suggested before requires these three files.

Habilidades: DNS, Servidor Windows

Ver mais: windows dns zone transfers bind records, bind zone transfer windows 2008, linux bind zone transfer windows dns, primary zone secondary zone, open dns, windows servers, windows 2008, primary, ns2 c, boxes, bind, bind zone, linux dns server configuration, server 2008 dns configuration, windows open dns server, windows server dns, windows dns server, windows 2008 server dns configuration, windows 2008 dns configuration, file server configuration windows server 2008, sync dns servers linux, windows dns server configuration 2008, box linux, dns configuration 2008 server, windows server dns configuration

Acerca do Empregador:
( 0 comentários ) Melbourne, Australia

ID do Projeto: #5101997

1 freelancer está ofertando em média $111 para este trabalho

darkobazulj

I have idea how to implement this situation. On Bind how zones are created, manually or by some software? Those name servers are on LAN or they are visible on internet? And just to confirm Bind will be primary Mais

$111 AUD in 3 dias
(1 Comentário)
1.0