我的系统是:RH8
eth0:192.168.0.8
我想用192.168.0.8 这个IP 地址为不同的域名做解析:比如:
www.cool.com 192.168.0.8
www.go.com 192.168.0.8
named.conf 配置如下:
options {
directory "/var/named";
};
zone "." {
type hint;
file "named.ca";
};
zone "cool.com" {
type master;
file "named.cool";
};
zone "0.168.192.in-addr.arpa" {
type master;
file "named.cool.arpa";
};
zone " go.com" {
type master;
file "named.go";
};
zone "0.0.127.in-addr.arpa"{
type master;
file "named.localhost.arpa";
};
named.cool 配置如下:
@ IN SOA www.cool.com. root.www.cool.com. (
2002011601 ; serial
10800 ;refresh
3600 ;retry
604800 ;expire
86400 ;default_ttl
)
IN NS www.cool.com.
cool.com. IN A 192.168.0.8
localhost IN A 127.0.0.1
www IN A 192.168.0.8
dns IN A 192.168.0.8
ftp IN A 192.168.0.8
named.cool.arpa 配置如下:
@ IN SOA www.cool.com. root.www.cool.com. (
2002011601 ; serial
10800 ;refresh
3600 ;retry
604800 ;expire
86400 ;default_ttl
)
IN NS www.cool.com.
8 IN PTR www.cool.com.
8 IN PTR www.go.com.
我通过测试:
ping www.cool.com 可以返回 192.168.0.8
nslookup www.cool.com 返回 name:www.cool.com server:192.168.0.8
ping www.go.com 返回 unknown host www.go.com
nslookup 192.168.0.8 返回
8.0.168.192.in-addr.arpa name=www.go.com.
8.0.168.192.in-addr.arpa name=www.cool.com.
resolv.conf 配置如下:
domain cool.com
nameserver:192.168..0.8
serach localdomain
我的配置有问题吗? 如何实现这个功能。盼复!谢谢! |