- 论坛徽章:
- 0
|
redhat 9.0下的DNS服务器
---------------------------vi /etc/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 "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; };
};
zone "0.168.192.in-addr.arpa" IN {
type master;
file "ip2name.conf";
allow-update { none; };
};
zone "example.com" IN {
type master;
file "name2ip.conf";
allow-update { none; };
};
include "/etc/rndc.key";
-------------------vi /var/named/name2ip.conf-------------------------
$TTL 86400
$ORIGIN example.com.
@ IN SOA server.example.com. root.server.example.com. (
1997022700 ; Serial
28800 ; Refresh
14400 ; Retry
3600000 ; Expire
86400 ) ; Minimum
IN NS server.example.com.
IN A 192.168.0.44
server IN A 192.168.0.44
localhost IN A 127.0.0.1
www IN A 192.168.0.44
ftp IN A 192.168.0.44
www1 IN CNAME server.example.com.
@ IN A 192.168.0.44
--------------------vi /var/named/ip2name.conf------------------------
$TTL 86400
$ORIGIN example.com.
@ IN SOA server.example.com. root.server.example.com. (
1997022700 ; Serial
28800 ; Refresh
14400 ; Retry
3600000 ; Expire
86400 ) ; Minimum
IN NS server.example.com.
44 IN PTR server.example.com. |
|