First you need to install bind on your server by typing
apt install bind9 bind9utils bind9-doc
now we need to go to bind folder by typing
cd /etc/bind/
now we need to create a zone by typing
nano named.conf.local
here we gonna add our domain
zone "mysite.com" {
type master;
file "/etc/bind/mysite.com.zone";
};
now we gonna create our zone by typing
$TTL 86400 now need to restart the bind by typing and we should be done with dns server if you have any question please leave the comment below
nano mysite.com.zone
@ IN SOA ns2.mysite.com. ns2.mysite.com. (
2017071001 ;Serial
3600 ;Refresh
1800 ;Retry
604800 ;Expire
86400 ;Minimum TTL
)
@ IN NS ns1.mysite.com.
@ IN NS ns2.mysite.com.
@ IN A 192.168.0.100
ns1 IN A 192.168.0.11
ns2 IN A 192.168.0.10
systemctl restart bind9