Let's say I want to host my own public DNS for my domain name instead of using the default name servers provided by my registrar.
I spin up two cloud servers, each in different data centers for redundancy. We call one dc1dns01 and the other dc2dns02. If I run hostname -f, I get:
Host 1:
dc1dns01.example.com
Host 2:
dc2dns02.example.com
I go to my registrations website, and register my name servers in their portal. I basically say I want ns1 (dc1dns01) and ns2 (dc2dns02) to be name servers and here are the IP's.
I go into the forward zone config and add:
@ IN NS ns1.example.com
ns1 IN A a.b.c.d
@ IN NS ns2.example.com
ns2 IN A a.b.c.d
Is this proper? Do I have to add an additional line in /etc/hosts? i.e.
a.b.c.d dc1dns01.example.com dc1dns01
a.b.c.d ns1.example.com ns1