0000
作家
作家
  • 铜币143枚
  • 威望34点
  • 贡献值1点
阅读:1597回复:4

DNS服务器配置记录

楼主#
更多 发布于:2007-05-06 08:25
服务器选择

DNS服务器使用一台Sun Ultra10服务器,该服务器因年岁已高,不堪其它应用重任,小存储容量(4G)用来当不需高性能运算或大量存储数据的DNS正合适。该服务器原生系统是Sun Solaris8,因为年代已久,登入口令遗失,无法再使用,考虑DNS需要稳定环境,而Solaris10又占资源,所以选择FreeBSD系统,搭配 bind服务程序。

系统安装

从FreeBSD官方下载光盘镜像(2CD,后来发现实际精减安装只需要第一张即可),刻录后放入光驱,按stop+A从光驱起动(这是Sun机器比较奇怪的地方,而且键盘上有奇怪的stop键-_-#)。启动安装程序后,选择最精减的安装即可,无需安装过多内容。安装速度很快就会完成。

启动bind服务

FreeBSD系统安装完成后便自己安装好bind程序,在FreeBSD系统中名为named。命令: /etc/rc.d/named forcestart 即可起动bind服务。

配置DNS

1. 修改配置文件/etc/namedb/named.conf,在文档末尾加入以下内容:
1. zone "nacta.edu.cn" {
   2.                type master;
   3.                file "master/nacta.edu.cn";
   4.        };
   5.        zone "nacta.cn" {
   6.                type master;
   7.                file "master/nacta.cn";
   8.        };
   9.        zone "acto.org.cn" {
  10.                type master;
  11.                file "master/acto.org.cn";
  12.        };
  13.        zone "227.244.218.in-addr.arpa" {
  14.                type master;
  15.                file "master/218.db";
  16.        };


这样便定义好本校三个正向解析域和一个反向解析域。
2. 根据以上配置,建立 /etc/namedb/master/nacta.edu.cn文件,内容如下:
1. $TTL 3600 ;1 hour
   2.        nacta.edu.cn.    IN    SOA    ns.nacta.edu.cn. admin.nacta.edu.cn. (
   3.        2007041601 10800 3600 604800 86400 )
   4.        ;DNS Servers
   5.            IN    NS    ns.nacta.edu.cn.
   6.       
   7.        ;MX Records
   8.        IN    MX 10 mail.nacta.edu.cn.
   9.  
  10.        IN    A     218.244.227.23
  11.  
  12.        ;Machine Names
  13.        localhost    IN    A    127.0.0.1
  14.        ns           IN    A    218.244.227.10
  15.        mail         IN    A    218.244.227.20
  16.        www          IN    A    218.244.227.23
  17.        建立 /etc/namedb/master/nacta.cn 文件,内容如下:
  18.        $TTL 3600 ;1 hour
  19.        nacta.cn.    IN    SOA    ns.nacta.edu.cn. admin.nacta.edu.cn. (
  20.        2007041601 10800 3600 604800 86400 )
  21.        ;DNS Servers
  22.        IN    NS    ns.nacta.edu.cn.
  23.  
  24.        ;MX Records
  25.        IN    MX 10 mail.nacta.edu.cn.
  26.       
  27.        IN    A     218.244.227.23
  28.  
  29.        ;Machine Names
  30.        localhost    IN    A    127.0.0.1
  31.        ns           IN    A    218.244.227.10
  32.        mail         IN    A    218.244.227.20
  33.        www          IN    A    218.244.227.23

建立 /etc/namedb/master/acto.org.cn文件,内容如下:
1. $TTL 3600 ;1 hour
   2.        acto.org.cn.    IN    SOA    ns.nacta.edu.cn. admin.nacta.edu.cn. (
   3.        2007041601 10800 3600 604800 86400 )
   4.        ;DNS Servers
   5.        IN    NS    ns.nacta.edu.cn.
   6.       
   7.        ;MX Records
   8.        IN    MX 10 mail.nacta.edu.cn.
   9.       
  10.        IN    A     218.244.227.23
  11.  
  12.        ;Machine Names
  13.        localhost    IN    A    127.0.0.1
  14.        ns           IN    A    218.244.227.10
  15.        mail         IN    A    218.244.227.20
  16.        www          IN    A    218.244.227.23

建立/etc/namedb/master/218.db文件,内容如下:
1. $TTL    604800
   2.        227.244.218.in-addr.arpa.    IN    SOA    nacta.edu.cn. admin.nacta.edu.cn. (
   3.        2007041601 604800 86400 2419200 604800 )
   4.        IN    NS    nacta.edu.cn.
   5.        10    IN    PTR    ns.nacta.edu.cn.
   6.        20    IN    PTR    mail.nacta.edu.cn.
   7.        20    IN    PTR    mail.nacta.cn.
   8.        20    IN    PTR    mail.acto.org.cn.
   9.        23    IN    PTR    www.nacta.edu.cn.
  10.        23    IN    PTR    www.acto.org.cn.
  11.        23    IN    PTR    www.nacta.cn.

完成配置
/etc/rc.d/named restart 重启dns服务,服务器配置完成

原文地址:http://www.henjiuhenjiuyiqian.cn/?p=8
.--. |o_o | |:_/ | // \ \ (| | ) /'\_ _/`\ \___)=(___/
suchasplus
作家
作家
  • 铜币16枚
  • 威望11点
  • 贡献值1点
1C#
发布于:2007-05-06 10:25
Re:DNS服务器配置记录
...
0000sir转行了?
The history of these days will be written in blood... By crushing the armies of our enemy, by seizing the weapons they thought to turn against us, we were fighting for our very existence!
suchasplus
作家
作家
  • 铜币16枚
  • 威望11点
  • 贡献值1点
2C#
发布于:2007-05-06 10:26
Re:DNS服务器配置记录
搞个确定可行的SMTP+POP3/IMAP配置看看~
最好是带CentOS的
The history of these days will be written in blood... By crushing the armies of our enemy, by seizing the weapons they thought to turn against us, we were fighting for our very existence!
0000
作家
作家
  • 铜币143枚
  • 威望34点
  • 贡献值1点
3C#
发布于:2007-05-06 11:03
Re:DNS服务器配置记录
暂时用不到~~~mail服务器是eYou的~~好像有个硬件的邮件服务器没人用,好像可以拿来玩~~
.--. |o_o | |:_/ | // \ \ (| | ) /'\_ _/`\ \___)=(___/
0000
作家
作家
  • 铜币143枚
  • 威望34点
  • 贡献值1点
4C#
发布于:2007-05-24 18:48
Re:DNS服务器配置记录
原文地址改为 http://color-magic.cn/?p=8
.--. |o_o | |:_/ | // \ \ (| | ) /'\_ _/`\ \___)=(___/
游客

返回顶部