BIND: Menambahkan Record
Konfigurasi Server Primary Master
Pada bagian ini BIND9 akan dikonfigurasi sebagai primary master untuk domain example.com. Kita dapat dengan mudah mengubah example.com dengan domain yang kita inginkan.
Zone File
Untuk menambahkan DNS zone ke BIND9, dan membuat BIND9 menjadi server Primary Master, yang kita perlu lakukan adalah mengedit named.conf.local:
[...] zone "example.com" { type master; file "/etc/bind/db.example.com"; }; [...]
Gunakan zone file yang ada sebagai templaye, misalnya:
sudo cp /etc/bind/db.local /etc/bind/db.example.com
Edit the new zone file /etc/bind/db.example.com change localhost. to the FQDN of your server, leaving the additional "." at the end. Change 127.0.0.1 to the nameserver's IP Address and root.localhost to a valid email address, but with a "." instead of the "@". also leaving the "." at the end.
Also, create an A record for ns.example.com the name server in this example:
; ; BIND data file for local loopback interface ; $TTL 604800 @ IN SOA ns.example.com. root.example.com. ( 1 ; Serial 604800 ; Refresh 86400 ; Retry 2419200 ; Expire 604800 ) ; Negative Cache TTL ; @ IN NS ns.example.com. ns IN A 192.168.1.10 ;also list other computers box IN A 192.168.1.21
You must increment the serial number every time you make changes to the zone file. If you make multiple changes before restarting BIND9, simply increment the serial once.
Now, you can add DNS records to the bottom of the zone.
Tip: Many people like to use the last date edited as the serial of a zone, such as 2005010100 which is yyyymmddss (where s is serial)
Once you've made a change to the zone file BIND9 will need to be restarted for the changes to take effect:
sudo /etc/init.d/bind9 restart