How To Update a Zone File: (BIND/PowerDNS/NSD)
- Open the zone file located in the /var/named directory
- Make the required changes to the intended record type
- Change the serial number (Usually incrementing it by one so for example from 2020122904 to 2020122905
- Write, save and exit the zone file
- Reload the config file using the rndc command like this:
rndc reload
rndc reconfig
rndc reload zonename
If you have not already configured an RNDC key for your name server then the above commands would not work. In these situations, you will either have to configure the RNDC key (here) or instead restart the name server to reload the config files with one of the following commands:
systemctl restart named
systemctl restart pdns
systemctl restart nsd
- Then check the main system error log at /var/log/messages to see if there are any errors reported
- Then you can test the new changes using the dig command:
dig @IP-OF-The-NAME-SERVR {record type} DOMAIN +short
EX:
dig @localhost subdomain.cptest.tld +short
1.1.1.1
_____________________________________________________________________________________________
How To Update a Zone File: (MyDNS)
- Open the zone file located in the /var/named directory
- Make the required changes to the intended record type
- Change the serial number (Usually incrementing it by one so for example from 2020122904 to 2020122905
- Write, save and exit the zone file
- log into the MySQL and into this database: mydns_hostname and run these commands:
select max(d) from rr;
select * from soa;
INSERT INTO rr VALUES (rr.id, rr.zone=soa.id, name, data, aux, ttl, type, active, serial;
This is to insert the new value
UPDATE rr SET data="data" WHERE id=rr.id;
This is to modify it.
exit;
- Then you can test the new changes using the dig command:
dig @IP-OF-The-NAME-SERVR {record type} DOMAIN +short
EX:
dig @localhost subdomain.cptest.tld +short
1.1.1.1