|
各路高手,小弟我还是linux新手,在看了linux书及论坛中有关DNS配置后决定自己配一下但起不来,敬请指点迷津,万分感谢!
hosts.conf文件内容如下:
127.0.0.1 localhost.localdomain localhost
192.168.1.1 shan shan
192.168.1.2 freeboy.com freeboy
named.conf文件内容如下:
// generated by named-bootconf.pl
options {
directory "/var/named";
/*
* If there is a firewall between you and nameservers you want
* to talk to, you might need to uncomment the query-source
* directive below. Previous versions of BIND always asked
* questions using port 53, but BIND 8.1 uses an unprivileged
* port by default.
*/
// query-source address * port 53;
};
//
// a caching only nameserver config
//
controls {
inet 127.0.0.1 allow { localhost; } keys { rndckey; };
};
zone "." IN {
type hint;
file "named.ca";
};
zone "freeboy.com" IN {
type master;
file "freeboy.com.conf";
};
zone "1.168.192.in-addr.arpa" IN {
type master;
file "1.168.192.conf"
};
zone "localhost" IN {
type master;
file "localhost.zone";
allow-update { none; };
};
zone "0.0.127.in-addr.arpa" IN {
type master;
file "named.local";
allow-update { none; };
};
freeboy.com.conf文件内容如下:
freeboy.com @ IN SOA freeboy.com. root.freeboy.com. (
200300701 ; serial (d. adams)
28800 ; refresh
14400 ; retry
3600000 ; expiry
86400 ) ; minimum
IN NS freeboy.com.
www IN A 192.168.1.2
mail IN A 192.168.1.2
linux IN CNAME mail
ftp IN A 192.168.1.2
1.168.192.conf文件内容如下:
freeboy.com @ IN SOA freeboy.com. root.freeboy.com. (
200300701 ; serial (d. adams)
28800 ; refresh
14400 ; retry
3600000 ; expiry
86400 ) ; minimum
IN NS freeboy.com.
192.168.1.2 IN PTR www
192.168.1.2 IN PTR ftp
192.168.1.2 IN PTR mail
192.168.1.2 IN PTR linux |
|