bindDNS

CREATE TABLE mydomain (

name varchar(255) default NULL,

ttl int(11) default NULL,

rdtype varchar(255) default NULL,

rdata varchar(255) default NULL

) TYPE=MyISAM;

CREATE TABLE ptr (

name varchar(255) default NULL,

ttl int(11) default NULL,

rdtype varchar(255) default NULL,

rdata varchar(255) default NULL

) TYPE=MyISAM;

INSERT INTO mydomain VALUES (‘mydomain.com’, 259200, ‘SOA’, ‘mydomain.com. www.mydomain.com. 200309181 28800 7200 86400 28800’);

INSERT INTO mydomain VALUES (‘mydomain.com’, 259200, ‘NS’, ‘ns0.mydomain.com.’);

INSERT INTO mydomain VALUES (‘mydomain.com’, 259200, ‘NS’, ‘ns1.mydomain.com.’);

INSERT INTO mydomain VALUES (‘mydomain.com’, 259200, ‘MX’, ’10 mail.mydomain.com.’);

INSERT INTO mydomain VALUES (‘w0.mydomain.com’, 259200, ‘A’, ‘192.168.1.1’);

INSERT INTO mydomain VALUES (‘w1.mydomain.com’, 259200, ‘A’, ‘192.168.1.2’);

INSERT INTO mydomain VALUES (‘mydomain.com’, 259200, ‘Cname’, ‘w0.mydomain.com.’);

INSERT INTO mydomain VALUES (‘mail.mydomain.com’, 259200, ‘Cname’, ‘w0.mydomain.com.’);

INSERT INTO mydomain VALUES (‘ns0.mydomain.com’, 259200, ‘Cname’, ‘w0.mydomain.com.’);

INSERT INTO mydomain VALUES (‘ns1.mydomain.com’, 259200, ‘Cname’, ‘w1.mydomain.com.’);

INSERT INTO mydomain VALUES (‘www.mydomain.com’, 259200, ‘Cname’, ‘w0.mydomain.com.’);

INSERT INTO mydomain VALUES (‘ftp.mydomain.com’, 259200, ‘Cname’, ‘w0.mydomain.com.’);

INSERT INTO ptr VALUES (‘19.202.220.in-addr.arpa’, 17600, ‘SOA’, ‘mydomain.com. www.mydomain.com. 200309181 28800 7200 86400 28800’);

INSERT INTO ptr VALUES (‘19.202.220.in-addr.arpa’, 17600, ‘NS’, ‘ns0.mydomain.com.’);

INSERT INTO ptr VALUES (‘19.202.220.in-addr.arpa’, 17600, ‘NS’, ‘ns1.mydomain.com.’);

INSERT INTO ptr VALUES (‘82.19.202.220.in-addr.arpa’, 17600, ‘PTR’, ‘mail.mydomain.’);

zone “mydomain.com" {

type master;

database “mysqldb dnsdb mydomain localhost root passwd"; 配置你的數據庫名,表名,MYSQL主機,MYSQL用戶,MYSQL密碼

};

zone “19.202.220.in-addr.arpa" {

type master;

database “mysqldb dnsdb ptr localhost root passwd"; 配置你的數據庫名,表名,MYSQL主機,MYSQL用戶,MYSQL密碼

};