DNS

注释: /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 "home.com.cn" IN {
	type master;
	file "home.com.cn.zone";
	allow-update { none; };
};
zone "200.168.192.in-addr.arpa" IN {
	type master;
	file "home.com.cn.rev";
	allow-update { none; };
};


include "/etc/rndc.key";

/var/named/home.com.cn.zone 的内容

$TTL	86400
@	IN SOA	ns.home.com.cn. root.ns.home.com.cn(
	42		; serial (d. adams)
	3H		; refresh
	15M		; retry
	1W		; expiry
	1D )		; minimum

	IN	NS	ns.home.com.cn.
	IN	MX    10 mail.home.com.cn.
18 	IN PTR  ns.home.com.cn.

31 	IN PTR	Baby.home.com.cn.
31 	IN PTR	ann.home.com.cn.
/var/named/home.com.cn.rev 的内容

$TTL	86400

@	IN SOA	ns.home.com.cn. root.ns.home.com.cn(
	42		; serial (d. adams)
	3H		; refresh
	15M		; retry
	1W		; expiry
	1D )		; minimum

	IN	NS	ns.home.com.cn.
	IN	MX	10 mail.home.com.cn.
localhost IN A		127.0.0.1
ns 	IN A	192.168.200.18
mail 	IN A	192.168.200.18
Baby 	IN A	192.168.200.31
ann 	IN A	192.168.200.18
test 	IN A	192.168.200.27
  1. /etc/init.d/named start
  2. /usr/sbin/rdnc reload
  3. /usr/sbin/named-checkzone zonename zonefile
  4. /usr/sbin/named-checkconf /etc/name.conf