I've BIND on my lan and I created a zone:
$ORIGIN example.com.
$TTL 604800 ; 1 week
@ IN SOA ns1.example.com. max.example.com. (
2017103151 ; serial
604800 ; refresh (1 week)
86400 ; retry (1 day)
2419200 ; expire (4 weeks)
604800 ; minimum (1 week)
)
IN NS ns1.example.com.
IN NS ns2.example.com.
MX 10 mx1.example.com.
server1 A 192.168.1.100
ns1 A 192.168.1.101
ns2 A 192.168.1.102
mx1 A 192.168.1.100
ftp CNAME server1
pop3 CNAME server1
imap CNAME server1
REVERSE ZONE:
$ORIGIN 1.168.192.in-addr.arpa.
$TTL 604800 ; 1 week
@ IN SOA ns1.example.com. max.example.com. (
2017103136 ; serial
604800 ; refresh (1 week)
86400 ; retry (1 day)
2419200 ; expire (4 weeks)
604800 ; minimum (1 week)
)
IN NS ns1.example.com.
IN NS ns2.example.com.
100 PTR ftp.example.com.
100 PTR mx1.example.com.
100 PTR www.example.com.
100 PTR smtp.example.com.
100 PTR mail.example.com.
100 PTR pop3.example.com.
100 PTR imap.example.com.
101 PTR ns1.example.com.
102 PTR ns2.example.com.
Everything works, but there's a strange behavior with ping command:
ping mx1.example.com
64 bytes from www.example.com (192.168.1.100): icmp_seq=1 ttl=64 time=0.102 ms
ping imap.example.com
64 bytes from pop3.example.com (192.168.1.100): icmp_seq=1 ttl=64 time=0.102 ms