Your clients just need to add an A
record pointing their domain to the IP address of your HAproxy.
I would advise against asking them to change the authoritative name servers for their zone: they will contact you every time they want to add a new record. However, if this is what you want to provide, let's assume 1.2.3.3
is the address of your HAproxy, 1.2.1.1
of the master DNS server (ns1.abcd.com
) and 1.2.2.2
that of the slave server. Create a zone file like this (let's say in /etc/bind/zones/db.default
:
$TTL 10800 ; 3 hours
@ IN SOA ns1.abcd.com. admin.abcd.com. (
2019120900 ; serial
10800 ; refresh (3 hours)
3600 ; retry (1 hour)
2419200 ; expire (4 weeks)
3600 ; minimum (1 hour)
)
NS ns1.abcd.com.
NS ns2.abcd.com.
A 1.2.3.3
For every client you'll have to add a snippet to bind9
config (assuming that's what you are using) on your master DNS server:
zone "clients.domain.com" {
type master;
notify yes;
allow-transfer { 1.2.2.2; }
file "/etc/bind/zones/db.default";
};
and a similar snippet on the slave:
zone "clients.domain.com" {
type slave;
masters { 1.2.1.1; }
file "/etc/bind/zones/db.clients.domain.com";
}