I will share with you my working zone file called born2host.com.db:
$TTL 14400
born2host.com. 86400 IN SOA ns1.born2host.com. root.born2host.com. (
2016101602 ; serial, todays (yearmonthdaychangetimes)
3600 ; refresh, seconds
3600 ; retry, seconds
3600000 ; expire, seconds
7200 ) ; minimum, seconds
;; NS Records
born2host.com. IN NS ns1.born2host.com. //setting born2host.com in NameServer1
born2host.com. IN NS ns2.born2host.com. //setting born2host.com in NameServer2
;; A Records (Forwarding IPv4)
ns1.born2host.com. IN A 77.236.172.141 //setting IPv4 for NameServer1
ns2.born2host.com. IN A 77.236.172.141 //setting IPv4 for NameServer2 (yes, can be the same)
born2host.com. IN A 77.236.172.141 //setting IPv4 for born2host.com
localhost.born2host.com. IN A 127.0.0.1 //setting IPv4 for localhost
;; AAAA Records (Forwarding IPv6)
born2host.com. IN AAAA 2001:470:1f1a:d7::2 //setting IPv6 for born2host.com
;; MX Records (Mail Server)
born2host.com. IN MX 0 born2host.com. //setting MX(Mail eXchange(Mail Server)) record
;; CNAME Records (Aliases)
mail IN CNAME born2host.com. //setting alias mail.born2host.com
www IN CNAME born2host.com. //setting alias www.born2host.com
ftp IN CNAME born2host.com. //setting alias ftp.born2host.com
;; TXT Records (DKIM & SPF)
default._domainkey 14400 IN TXT "v=DKIM1; k=rsa; p=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCxFD7pZRKG3Ulq8M/QGHgV4sPuEvLx0pgNFhZqSdTanv/MOMT0PAIOduKpmOyUd4WVstJKuttBpPaoq7HhxX06tW9VUEjC/cC59YpVC7Kd+l0oj2yMu8iKOU065oj503N/7eW0Yd/kB0rvWHVHYOZ4Vu+q8o9YXiUOLuZ3E4WSWQIDAQAB" //DKIM record you should generate it through CWP admin panel
born2host.com. 14400 IN TXT "v=spf1 +a +mx +ip4:192.168.1.102 ~all" //SPF record also generate from CWP admin panel
That`s it. change born2host.com with your domain, generate DKIM and SPF records through CWP.admin panel and you are done. It will be working. Put the file your-domain.tld.db in /var/named and add this lines to your /etc/named.conf:
zone "born2host.com" in{
type master;
file "/var/named/born2host.com.db";
};
Change born2host.com to your-domain.tld and you are done. Have fun.