Type: System V - Launched Daemon
Packages: bind, bind-utils
Daemons: named
Script: named
Ports: 53 tcp、udp
Configs: /etc/named.conf, /var/named/*
/etc/named.conf 設定:
options {
directory "/var/named";
forwarders {*.*.*.*;}; //當找不到DNS時到*.*.*.*去找
allow-query {192.168.1/24;}; //限制可使用查詢的網域(針對client)
allow-transfer {192.168.1/24;}; //(針對slace DNS)
};//(網域正解)
zone "domain.com" {
type master;
file "db.domain.com";
};//(網域反解)
zone "1.168.192.in-addr.arpa" {
type master;
file "db.192.168.1";
};正解設定:
/var/named/db.domain.com
$TTL 86400
@ IN SOA host.domain.com. root.host.domain.com. (
**** ; //序號, 通常為日期
**** ; //更新時間(秒)
**** ; //再詢問
**** ; //作廢
**** ) //最前面ttl沒有設定,就以此值為ttl之值
@ IN NS host.domain.com.@ IN A 192.168.1.1
host.domain.com. IN A 192.168.1.1
www IN A 192.168.1.1 ;//(ftp, mail, pop.......)以此類推
www2 IN CANME host.domain.com.
host IN MX 10 host.domain.com.
反解設定:
/var/named/db.192.168.1
$TTL 86400
@ IN SOA host.domain.com. root.host.domain.com. ( **** **** **** **** ***** )
IN NS host.doamin.com.
//或者 @ IN NS host.domain.com.
1.1.168.192.in-addr.arpa IN PTR host.domain.com.//或者 1 IN PTR host.domain.com.
沒有留言:
張貼留言