本人环境:
ubuntu 7.10
本机的ip:192.168.100.222
1.sudo apt-get install bind9
2./etc/bind/named.conf.local
zone "100.168.192.in-addr.arpa"{
type master;
file "/etc/bind/db.192.168.100";
};
zone "websketch.com"{
type master;
file "/etc/bind/db.websketch.com";
};
~
db.192.168.100 文件如下:
$TTL 604800
@IN SOA websketch.com. root.websketch.com.(
1;Serial
604800;Refresh
86400;Retry
2419200;Expire
604800);Negative Cache TTL;
@ IN NS websketch.com.
108 IN PTR websketch.com.
db.websketch.com文件如下:
$TTL 604800
@ IN SOA ubuntu.websketch.com. root.ubuntu.websketch.com.(
1;
604800;
86400;
2419200;
604800);
@ IN NS ubuntu.websketch.com
websketch.com. IN NS ubuntu.websketch.com
ubuntu IN A 192.168.100.222
www IN CNAME ubuntu
* IN A 192.168.100.222
3。vim /etc/resolv.conf
search websketch.com
nameserver 192.168.100.222
测试:nslookup所以的*.websket.com
> ad.websketch.com
Server: 192.168.100.222
Address: 192.168.100.222#53
Name: ad.websketch.com
Address: 192.168.100.222