Linux 网管 123 --- 第7章. 自订的组态及管理内容 -2.DNS
来源:Linux-cn.com
作者:Webmaster
时间:2007-05-05
点击:
[
收藏] [
投稿]
网域名称伺服器 (DNS) 组态及管理 在我工作的很多地方,我们使用 Linux 作为 DNS 伺服器。它表现的非常好。这一节将会指出使用 Red Hat 发行版内含的标准 BIND 8.x 套件所提供这些服务的 DNS table 组态 注意: Red Hat 5.1 及更早的版本使用 BIND 4.x 套件,它的组态档格式有一点点不同。 BIND 8.x 比 BIND 4.x 提供更多的功能,而且 4.x 已经不再发展了, 您可能需要考虑升级到最新版的 BIND 套件。 先安装 BIND RPM 套件 (查看 第10章,使用 Red Hat 套件管理程式 (RPM) 一节 有关使用 RPM 公用程式 的细节),然後转换您的组态成新的格式。 幸运地,转换原有的 BIND 4.x 组态档以符合 BIND 8.x 很简单 ! 就像是 BIND 位於文件档的目录下的一部份 (例如, ``/usr/doc/bind-8.1.2/'' 相对於 BIND version 8.1.2),有一个档叫做 ``named-bootconf.pl'' , 这是一个可执行的 Perl 程式。 假设您已经在系统上安装好 Perl,您可以利用这个程式转换您的组态档。键入 下列指令完成它 (以 root 身分): cd /usr/doc/bind-8.1.2 ./named-bootconf.pl < /etc/named.boot > /etc/named.conf mv /etc/named.boot /etc/named.boot-obsolete
您现在应该会得到一个可以在 BIND 8.x 下使用的档案 ``/etc/named.conf'' 。 原有的 DNS table 在新版的 BIND 下也可以使用, 因为 table 的格式还是一样。
在 Linux 下组态 DNS 服务与下列步骤有关: 要起始 DNS 服务, ``/etc/host.conf''这个档案看起来应该像下面着个样子: # Lookup names via /etc/hosts first, then by DNS query order hosts, bind # We don't have machines with multiple addresses multi on # Check for IP address spoofing nospoof on # Warn us if someone attempts to spoof alert on
加大的 spoof 侦测可以增加一点 DNS 搜寻的命中率(管可以忽略),所以如果您不担心这个的话可以 disable “nospool”及“alert” 项目。
依需要编辑 ``/etc/hosts'' 档。一般在这里不必改太多, 但为了增加效率可以增加您最常存取的主机 (像是本地伺服器) 以避免过度使用 DNS 搜寻在他们身上。
``/etc/named.conf'' 档应该根据下面例组态指出 DNS table
(注意:下面的 IP 位址只是例,必须根据您自己的 class 位址更改!):
options { // DNS tables are located in the /var/named directory directory "/var/named";
// Forward any unresolved requests to our ISP's name server // (this is an example IP address only -- do not use!) forwarders { 123.12.40.17; };
/* * 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; };
// Enable caching and load root server info zone "named.root" { type hint; file ""; };
如果您对本文有任何疑问或者建议,请到讨论区发表您的意见:
>>
论坛入口 <<
上一篇:Linux 网管 123 --- 第7章. 自订的组态及管理内容 -1.HTTP 下一篇:Linux 网管 123 --- 第7章. 自订的组态及管理内容 -3.使用 TACACS
【文章评论】
【收藏本文】
【推荐好友】
【打印本文】
【我要投稿】 【论坛讨论】
更多相关文章
|
|