// named.rfc1912.zones:
//
// Provided by Red Hat caching-nameserver package
//
// ISC BIND named zone configuration for zones recommended by
// RFC 1912 section 4.1 : localhost TLDs and address zones
//
// See /usr/share/doc/bind*/sample/ for example named configuration files.
//
zone \".\" IN {
type hint;
file \"named.ca\";
};
zone \"yjw.com\" IN {
type master;
file \"yjw.com.zone\";
allow-update { none; };
};
zone \"1.168.192.in-addr.arpa\" IN {
type master;
file \"192.168.1.local\";
allow-update {none;};
};
[root@ser etc]# vim named.conf
//
// named.caching-nameserver.conf
//
// Provided by Red Hat caching-nameserver package to configure the
// ISC BIND named(8) DNS server as a caching only nameserver
// (as a localhost DNS resolver only).
//
// See /usr/share/doc/bind*/sample/ for example named configuration files.
//
// DO NOT EDIT THIS FILE - use system-config-bind or an editor
// to create named.conf - edits to this file will be lost on
// caching-nameserver package upgrade.
//
options {
listen-on port 53 { any; };
listen-on-v6 port 53 { ::1; };
directory \"/var/named\";
dump-file \"/var/named/data/cache_dump.db\";
statistics-file \"/var/named/data/named_stats.txt\";
memstatistics-file \"/var/named/data/named_mem_stats.txt\";
query-sourceport 53;
query-source-v6 port 53;
allow-query { any; };
};
logging {
channel default_debug {
file \"data/named.run\";
severity dynamic;
};
};
view localhost_resolver {
match-clients{ any; };
match-destinations { any; };
recursion yes;
include \"/etc/named.rfc1912.zones\";
};
# 红色为修改部分
[root@ser etc]# cd ../var/named/
[root@ser etc]# cd ../var/named/
[root@ser named]# ll
total 44
drwxrwx--- 2 named named 4096 Apr 30 13:21 data
-rw-r----- 1 rootnamed198 Jan 172007 localdomain.zone
-rw-r----- 1 rootnamed195 Jan 172007 localhost.zone
-rw-r----- 1 rootnamed427 Jan 172007 named.broadcast
-rw-r----- 1 rootnamed 2518 Jan 172007 named.ca
-rw-r----- 1 rootnamed424 Jan 172007 named.ip6.local
-rw-r----- 1 rootnamed426 Jan 172007 named.local
-rw-r----- 1 rootnamed427 Jan 172007 named.zero
drwxrwx--- 2 named named 4096 Jul 272004 slaves
[root@ser named]# cp -p localdomain.zone yjw.com.zone
[root@ser named]# cp -p named.local 192.168.1.local
[root@ser named]# vim192.168.1.local
$TTL86400
@ INSOA yjw.com. root.yjw.com.(
1997022700 ; Serial
28800; Refresh
14400; Retry
3600000; Expire
86400 ); Minimum
INNS yjw.com.
108INPTR www.yjw.com.
108INPTR mail.yjw.com.
[root@ser named]#vim yjw.com.zone
$TTL86400
@ IN SOAyjw.com.root (
42; serial (d. adams)
3H; refresh
15M ; retry
1W; expiry
1D ); minimum
IN NS ns.yjw.com.
IN MX 10 mail.yjw.com.
nsINA192.168.1.108
www INCNAMEns.yjw.com.
mailIN A192.168.1.108
三、启动DNS服务
[root@ser named]# service named restart
Stopping named:[OK]
Starting named:[OK]
[root@ser named]#
四、测试
[root@ser named]# nslookup
>> www.163.com
Server: 127.0.0.1
Address:127.0.0.1#53
// named.rfc1912.zones:
//
// Provided by Red Hat caching-nameserver package
//
// ISC BIND named zone configuration for zones recommended by
// RFC 1912 section 4.1 : localhost TLDs and address zones
//
// See /usr/share/doc/bind*/sample/ for example named configuration files.
//
zone \".\" IN {
type hint;
file \"named.ca\";
};
zone \"yjw.com\" IN {
type master;
file \"yjw.com.zone\";
allow-update { none; };
};
zone \"1.168.192.in-addr.arpa\" IN {
type master;
file \"192.168.1.local\";
allow-update {none;};
};
[root@ser etc]# vim named.conf
//
// named.caching-nameserver.conf
//
// Provided by Red Hat caching-nameserver package to configure the
// ISC BIND named(8) DNS server as a caching only nameserver
// (as a localhost DNS resolver only).
//
// See /usr/share/doc/bind*/sample/ for example named configuration files.
//
// DO NOT EDIT THIS FILE - use system-config-bind or an editor
// to create named.conf - edits to this file will be lost on
// caching-nameserver package upgrade.
//
options {
listen-on port 53 { any; };
listen-on-v6 port 53 { ::1; };
directory \"/var/named\";
dump-file \"/var/named/data/cache_dump.db\";
statistics-file \"/var/named/data/named_stats.txt\";
memstatistics-file \"/var/named/data/named_mem_stats.txt\";
query-sourceport 53;
query-source-v6 port 53;
allow-query { any; };
};
logging {
channel default_debug {
file \"data/named.run\";
severity dynamic;
};
};
view localhost_resolver {
match-clients{ any; };
match-destinations { any; };
recursion yes;
include \"/etc/named.rfc1912.zones\";
};
# 红色为修改部分
[root@ser etc]# cd ../var/named/
[root@ser etc]# cd ../var/named/
[root@ser named]# ll
total 44
drwxrwx--- 2 named named 4096 Apr 30 13:21 data
-rw-r----- 1 rootnamed198 Jan 172007 localdomain.zone
-rw-r----- 1 rootnamed195 Jan 172007 localhost.zone
-rw-r----- 1 rootnamed427 Jan 172007 named.broadcast
-rw-r----- 1 rootnamed 2518 Jan 172007 named.ca
-rw-r----- 1 rootnamed424 Jan 172007 named.ip6.local
-rw-r----- 1 rootnamed426 Jan 172007 named.local
-rw-r----- 1 rootnamed427 Jan 172007 named.zero
drwxrwx--- 2 named named 4096 Jul 272004 slaves
[root@ser named]# cp -p localdomain.zone yjw.com.zone
[root@ser named]# cp -p named.local 192.168.1.local
[root@ser named]# vim192.168.1.local
$TTL86400
@ INSOA yjw.com. root.yjw.com.(
1997022700 ; Serial
28800; Refresh
14400; Retry
3600000; Expire
86400 ); Minimum
INNS yjw.com.
108INPTR www.yjw.com.
108INPTR mail.yjw.com.
[root@ser named]#vim yjw.com.zone
$TTL86400
@ IN SOAyjw.com.root (
42; serial (d. adams)
3H; refresh
15M ; retry
1W; expiry
1D ); minimum
IN NS ns.yjw.com.
IN MX 10 mail.yjw.com.
nsINA192.168.1.108
www INCNAMEns.yjw.com.
mailIN A192.168.1.108
三、启动DNS服务
[root@ser named]# service named restart
Stopping named:[OK]
Starting named:[OK]
[root@ser named]#
四、测试
[root@ser named]# nslookup
>> www.163.com
Server: 127.0.0.1
Address:127.0.0.1#53
// named.rfc1912.zones:
//
// Provided by Red Hat caching-nameserver package
//
// ISC BIND named zone configuration for zones recommended by
// RFC 1912 section 4.1 : localhost TLDs and address zones
//
// See /usr/share/doc/bind*/sample/ for example named configuration files.
//
zone \".\" IN {
type hint;
file \"named.ca\";
};
zone \"yjw.com\" IN {
type master;
file \"yjw.com.zone\";
allow-update { none; };
};
zone \"1.168.192.in-addr.arpa\" IN {
type master;
file \"192.168.1.local\";
allow-update {none;};
};
[root@ser etc]# vim named.conf
//
// named.caching-nameserver.conf
//
// Provided by Red Hat caching-nameserver package to configure the
// ISC BIND named(8) DNS server as a caching only nameserver
// (as a localhost DNS resolver only).
//
// See /usr/share/doc/bind*/sample/ for example named configuration files.
//
// DO NOT EDIT THIS FILE - use system-config-bind or an editor
// to create named.conf - edits to this file will be lost on
// caching-nameserver package upgrade.
//
options {
listen-on port 53 { any; };
listen-on-v6 port 53 { ::1; };
directory \"/var/named\";
dump-file \"/var/named/data/cache_dump.db\";
statistics-file \"/var/named/data/named_stats.txt\";
memstatistics-file \"/var/named/data/named_mem_stats.txt\";
query-sourceport 53;
query-source-v6 port 53;
allow-query { any; };
};
logging {
channel default_debug {
file \"data/named.run\";
severity dynamic;
};
};
view localhost_resolver {
match-clients{ any; };
match-destinations { any; };
recursion yes;
include \"/etc/named.rfc1912.zones\";
};
# 红色为修改部分
[root@ser etc]# cd ../var/named/
[root@ser etc]# cd ../var/named/
[root@ser named]# ll
total 44
drwxrwx--- 2 named named 4096 Apr 30 13:21 data
-rw-r----- 1 rootnamed198 Jan 172007 localdomain.zone
-rw-r----- 1 rootnamed195 Jan 172007 localhost.zone
-rw-r----- 1 rootnamed427 Jan 172007 named.broadcast
-rw-r----- 1 rootnamed 2518 Jan 172007 named.ca
-rw-r----- 1 rootnamed424 Jan 172007 named.ip6.local
-rw-r----- 1 rootnamed426 Jan 172007 named.local
-rw-r----- 1 rootnamed427 Jan 172007 named.zero
drwxrwx--- 2 named named 4096 Jul 272004 slaves
[root@ser named]# cp -p localdomain.zone yjw.com.zone
[root@ser named]# cp -p named.local 192.168.1.local
[root@ser named]# vim192.168.1.local
$TTL86400
@ INSOA yjw.com. root.yjw.com.(
1997022700 ; Serial
28800; Refresh
14400; Retry
3600000; Expire
86400 ); Minimum
INNS yjw.com.
108INPTR www.yjw.com.
108INPTR mail.yjw.com.
[root@ser named]#vim yjw.com.zone
$TTL86400
@ IN SOAyjw.com.root (
42; serial (d. adams)
3H; refresh
15M ; retry
1W; expiry
1D ); minimum
IN NS ns.yjw.com.
IN MX 10 mail.yjw.com.
nsINA192.168.1.108
www INCNAMEns.yjw.com.
mailIN A192.168.1.108
三、启动DNS服务
[root@ser named]# service named restart
Stopping named:[OK]
Starting named:[OK]
[root@ser named]#
四、测试
[root@ser named]# nslookup
>> www.163.com
Server: 127.0.0.1
Address:127.0.0.1#53