1 installing bind
Apt-Get installBind
2 configure bind
Edit BIND configuration named. conf;
VI/etc/bind/named. conf
Add a "zone" area;
Zone "sip.com "{
Type master;
File "named.sip.com ";
};
Note the directory in options. Put all zone files here.
;
Directory "/etc/bind ";
3 configure zone File
Here we add named.sip.com
VI/etc/bind/named.sip.com
; Bind dB file for sip.com
$ TTL 86400
@ In SOA primary.sip.com. admin.sip.com .(
2008090301; serial number yymmddnn
28800; refresh
7200; retry
864000; expire
86400; min TTL
)
NS primary.sip.com.
NS secondary.sip.com.
MX 10 mail.sip.com.
MX 20 mail-spool.sip.com.
_ Sip. _ udp srv 0 1 9 primary.sip.com.; SRV record
SRV 0 3 9 secondary.sip.com.
Primary in 10.30.32 . 30
Secondary in 10.30.32 . 31
Mail in 10.30.32 . 32
Mail-spool in 10.30.32 . 34
$ Origin sip.com.
4 Test
Echo "nameserver 127.0.0.1">/etc/resolv. conf
/Etc/init. d/Bind start
Dig primary.sip.com
Dig-t srv _ sip. _ udp.sip.com
Note:
You can use this PHP http://pgl.yoyo.org/adservers/bind-zone-file-creator.php to generate the required zone file, modify it yourself!