LinuxQuestions.org
Review your favorite Linux distribution.
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 10-29-2021, 11:20 AM   #1
shippropeller
LQ Newbie
 
Registered: Jul 2010
Location: Zurich
Posts: 5

Rep: Reputation: 0
Bind migration of master DNS (no DNSSEC used)


Hi

I run 2 bind DNS servers, 1 master and 1 slave on rented VPS from Linode and DigitalOcean on Ubuntu 16.04 which I want to migrate to newly setup VPS with Ubuntu 20.04
I don't want to upgrade them with do-release-upgrade.
There is no DNSSEC involved.

When I migrated last time from 14.04 to 16.04 I had to restart bind on new master and on slave several times until it was again in sync, so I want to do it "the right way" this time with smallest possible interruptions/restarts.

I saw already the ISC guide "How to change the nameservers for a zone":
https://kb.isc.org/docs/aa-00331

This doesn't answer how to change *master* nameserver for a zone or at least I don't recognize it in this article.

For the following config excerpts let's assume the 2 existing servers have IP addresses 10.1.1.1 (master) and 10.1.1.2 (slave) and the new master has 10.2.2.1, is configured as slave at the moment and also exists on TLD parent with glue.

--- old master 10.1.1.1 ---
#named.conf
acl slaves {
10.1.1.2;
10.2.2.1;
};
options {
recursion no;
allow-transfer { slaves; };
};
zone "example.com" in {
type master;
file "/etc/bind/db.example.com";
};

#/etc/bind/db.example.com
$TTL 3600
@ IN SOA oldmaster.example.com. webmaster.example.com. (
2021102901 ; Serial
10800 ; Refresh
3600 ; Retry
604800 ; Expire
86400 ; Minimum TTL )
IN NS oldmaster.example.com.
IN NS oldslave.example.com.
IN NS newmaster.example.com.
oldmaster IN A 10.1.1.1
oldslave IN A 10.1.1.2
newmaster IN A 10.2.2.1

--- slave 10.1.1.2 ---
#named.conf
masters masterservers { 10.1.1.1; };
options {
recursion no;
allow-transfer {"none";};
};
zone "example.com" in {
type slave;
masters { masterservers; };
file "db.example.com";
};

--- newmaster 10.2.2.1 (at the moment) ---
#named.conf
masters masterservers { 10.1.1.1; };
options {
recursion no;
allow-transfer {"none";};
};
zone "example.com" in {
type slave;
masters { masterservers; };
file "db.example.com";
};

--- END ---

So I need to change several Macros like masterservers, slaves, the MNAME in the SOA RR. If I remember correctly I did change last time the MNAME and as by reloading the oldmaster it recognized it is becoming slave and didn't send the update of SOA to slave. So I had to update things on newmaster, change masterservers Macro on slave and restart newmaster and slave and force retransfer and all such things.

So my question is: in which order do I change things to "do it right", all changes are sent via notifies by old or new master to respective servers and so on?

Regards,
shippropeller
 
Old 11-01-2021, 06:13 AM   #2
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,165
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
Hi,

I've done something similar in the past when changed ISPs. The procedure was more or less the following:

Copy the config file(s) from the old master and old slave to the new master and new slave respectively
Copy the zone files from the old master to the new master
Run a script in both new master and slave to replace the old IPs with the new ones
Start the new servers. The new master should notify and transfer zone data to the new slave.
Go to the registrar control panel and add the 2 new dns servers
Check that they can resolve the various domains that they are authoritative for.
Again to registrar and delete the 2 old dns servers
When ttl expires shutdown the 2 old dns servers

Of course you should check after every change by looking the logs
You can use intodns to see if the changes you made are propagated to clients


Regards
 
  


Reply

Tags
bind, dns, master, migration



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
DNSSEC "passes" the test it should fail at dnssec-failed.org Latitude Linux - Security 2 02-02-2017 01:35 PM
dnssec-keygen doesnt generate tsig keys in centos 6.6 running bind 9.9.2 SarahGurung Linux - Security 1 03-19-2015 07:52 AM
dnssec errors on bind 9.2.4 prasadyv Linux - Software 1 02-17-2014 04:41 AM
DNS/BIND - dnssec issues ezekieldas Linux - Software 0 06-16-2012 10:28 AM
bind - dnssec jsheffie Linux - Networking 0 07-28-2005 10:22 AM

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

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