自己简单的的DNS设置,记下来(转)[@more@]这个配置,公司的虚拟机上是可以的,可公司的主机上就不行,一模一样的设置就是不行,可回家在自己的主机上测试,又是一样的配置,又是可以的,真是搞不懂了。我靠……
named.conf
options {
directory "/var/named";
dump-file "/var/named/data/cache_dump.db";
statistics-file "/var/named/data/named_stats.txt";
};
zone "." IN {
type hint;
file "named.ca";
};
zone "localhost" IN {
type master;
file "named.localhost";
allow-update { none; };
};
zone "0.0.127.in-addr.qrpa" IN {
type master;
file "named.local";
allow-update { none; };
};
zone "myhome.cc" IN {
type master;
file "name2ip.conf";
allow-update { none; };
};
zone "1.168.192.in-addr.arpa" IN {
type master;
file "ip2name.conf";
allow-update { none; };
};
name2ip.conf
$TTL 86400
@ IN SOA my.myhome.cc. dayerong.hotmail.com. (
1053891162
3H
15M
1W
1D
)
@ IN NS my.myhome.cc.
@ IN MX 5 mail.myhome.cc.
my IN A 192.168.1.11
www IN CNAME my.myhome.cc.
ftp IN A 192.168.1.11
mail IN A 192.168.1.11
ip2name.conf
$TTL 86400
@ IN SOA my.myhome.cc. dayerong.hotmail.com.(
20031001
7200
3600
43200
86400 )
@ IN NS my.myhome.cc.
11 IN PTR my.myhome.cc.
11 IN PTR ftp.myhome.cc.
11 IN PTR mail.myhome.cc.
刚开始在options里设置了forwarders不行。不用设置。
named.conf
options {
directory "/var/named";
dump-file "/var/named/data/cache_dump.db";
statistics-file "/var/named/data/named_stats.txt";
};
zone "." IN {
type hint;
file "named.ca";
};
zone "localhost" IN {
type master;
file "named.localhost";
allow-update { none; };
};
zone "0.0.127.in-addr.qrpa" IN {
type master;
file "named.local";
allow-update { none; };
};
zone "myhome.cc" IN {
type master;
file "name2ip.conf";
allow-update { none; };
};
zone "1.168.192.in-addr.arpa" IN {
type master;
file "ip2name.conf";
allow-update { none; };
};
name2ip.conf
$TTL 86400
@ IN SOA my.myhome.cc. dayerong.hotmail.com. (
1053891162
3H
15M
1W
1D
)
@ IN NS my.myhome.cc.
@ IN MX 5 mail.myhome.cc.
my IN A 192.168.1.11
www IN CNAME my.myhome.cc.
ftp IN A 192.168.1.11
mail IN A 192.168.1.11
ip2name.conf
$TTL 86400
@ IN SOA my.myhome.cc. dayerong.hotmail.com.(
20031001
7200
3600
43200
86400 )
@ IN NS my.myhome.cc.
11 IN PTR my.myhome.cc.
11 IN PTR ftp.myhome.cc.
11 IN PTR mail.myhome.cc.
刚开始在options里设置了forwarders不行。不用设置。
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/10617542/viewspace-959675/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/10617542/viewspace-959675/