我们允许位於123.12.41.40;的主机(可能是我们网域上的一个次要;DNS伺服器)请求;zone;transfer 。如果您
漏了这个选项,位於;Internet;的任何人都可以请求这个转换 。因为这些资讯常被存心不良的人运用,我强
烈建议您除了到次要;DNS伺服器以外都限制;zone;transfer,或使用;loopback;address,;``127.0.0.1""作为替代 。;
现在您可以像在第三步骤组态``/etc/named.conf""档一样,设定位於;``var/named/"";目录的;;DNS;table; 。
第一次组态;DNS;资料库档是个大工程,并且超出本文讨论围 。有一些线上及印刷品型式的指南应该参考 。然而下
面有提供;一些例 。;
位於;``/var/named/mydomain_name.db"";正向查询档的例列:;
This;is;the;Start;of;Authority;(SOA);record.;;Contains;contact
&;other;information;about;the;name;server.;;The;serial;number
must;be;changed;whenever;the;file;is;updated;(to;inform;secondary
servers;that;zone;information;has;changed).
@;IN;SOA;mydomain.name.;;postmaster.mydomain.name.;(
19990811;;Serial;number
3600;;;;;;1;hour;refresh
300;;;;;;;5;minutes;retry
172800;;;;2;days;expiry
43200;);;;12;hours;minimum
List;the;name;servers;in;use.;;Unresolved;(entries;in;other;zones)
will;go;to;our;ISP"s;name;server;isp.domain.name.com
IN;NS;;;mydomain.name.
IN;NS;;;isp.domain.name.com.
This;is;the;mail-exchanger.;;You;can;list;more;than;one;(if
applicable),;with;the;integer;field;indicating;priority;(lowest
being;a;higher;priority)
IN;MX;;;mail.mydomain.name.
Provides;optional;information;on;the;machine;type;&;operating;system
used;for;the;server
IN;HINFOPentium/350;;;;;LINUX
A;list;of;machine;names;&;addresses
spock.mydomain.name.;;;;IN;A;;;;123.12.41.40;;;;;OpenVMS;Alpha
mail.mydomain.name.;;;;;IN;A;;;;123.12.41.41;;;;;Linux;(main;server)
kirk.mydomain.name.;;;;;IN;A;;;;123.12.41.42;;;;;Windows;NT;(blech!)
Including;any;in;our;other;class;C"s
twixel.mydomain.name.;;;IN;A;;;;126.27.18.161;;;;Linux;test;machine
foxone.mydomain.name.;;;IN;A;;;;126.27.18.162;;;;Linux;devel.;kernel
Alias;(canonical);names
gopher;;;;;;IN;CNAMEmail.mydomain.name.
ftp;IN;CNAMEmail.mydomain.name.
www;IN;CNAMEmail.mydomain.name.
位於;``/var/named/123_12.rev"";反向查询档的例列:;
This;is;the;Start;of;Authority;record.;;Same;as;in;forward;lookup;table.
@;IN;SOA;mydomain.name.;;postmaster.mydomain.name.;(
19990811;;Serial;number
3600;;;;;;1;hour;refresh
300;;;;;;;5;minutes;retry
172800;;;;2;days;expiry
43200;);;;12;hours;minimum
Name;servers;listed;as;in;forward;lookup;table
IN;NS;;;mail.mydomain.name.
IN;NS;;;isp.domain.name.com.
A;list;of;machine;names;&;addresses,;in;reverse.;;We;are;mapping
more;than;one;class;C;here,;so;we;need;to;list;the;class;B;portion
as;well.
40.41;;;;;;;IN;PTR;;;;spock.mydomain.name.
41.41;;;;;;;IN;PTR;;;;mail.mydomain.name.
42.41;;;;;;;IN;PTR;;;;kirk.mydomain.name.
As;you;can;see,;we;can;map;our;other;class;C"s;as;long;as;they;are
under;the;123.12.*;class;B;addresses
24.42;;;;;;;IN;PTR;;;;tsingtao.mydomain.name.
250.42;;;;;;IN;PTR;;;;redstripe.mydomain.name.
24.43;;;;;;;IN;PTR;;;;kirin.mydomain.name.
66.44;;;;;;;IN;PTR;;;;sapporo.mydomain.name.
No;alias;(canonical);names;should;be;listed;in;the;reverse;lookup
file;(for;obvious;reasons).
任何其他的;reverse;搜寻档需要;map;位址,在不同的;class;B;(像是;126.27.*);会被建立,并且会和上面
的反向查询档更相似 。;
确定;named;daemon;正在执行 。这个;daemon;通常在系统开机时由``/etc/rc.d/init.d/named"";这个档案启动 。;
您也可以手动地启动及停止这个;daemon;;;分别是键入;``named;start"";及;``named;stop"" 。;
无论对;DNS;table;做了什麽改变,应该键入;``/etc/rc.d/init.d/named;restart""重新启动;DNS;伺服器 。
推荐阅读
- Linux 网管 123 --- 第7章. 自订的组态及管理内容 -3.使用 TACACS
- Linux 网管 123 --- 第7章. 自订的组态及管理内容 -4.使用 Samba
- Linux 网管 123 --- 第7章. 自订的组态及管理内容 -5.使用 Netata
- Linux 网管 123 --- 第7章. 自订的组态及管理内容 -6.NFS
- Linux 网管 123 --- 第7章. 自订的组态及管理内容 -7.使用 Linuxc
- Linux 网管 123 --- 第8章. 备份及回存程序 -1.伺服器备份程序
- Linux 网管 123 --- 第8章. 备份及回存程序 -3.Cisco 路由器组态备
- Linux 网管 123 --- 第9章. 各种杂项管理工作 -1.检查储存空间
- Linux 网管 123 --- 第9章. 各种杂项管理工作 -2.管理进程
- Linux 网管 123 --- 第9章. 各种杂项管理工作 -4.使用 Cron 及 C
