帮我看看DNS为什么没配好?

由 李暮楚 在 09-11-2004 17:08 发表:

帮我看看DNS为什么没配好?

准备架设一个qmail服务器,打算先架起来dns.主机地址192.168.0.125,域名dream.com,邮件服务器域名mail.dream.com

主要是参照这个做的 http://www.chinaunix.net/jh/16/94879.html

用的是9.2.4rc4

1.从 http://www.isc.org/products/BIND/bi...件。目前版本为9 .24rc4,源文件为bind-9.2.2.rc4tar.gz。

2.将源文件bind-9.2.4rc4.tar.gz置于/usr/local/src目录下。

3.解压缩源文件bind-9.2.2.rc4.tar.gz

tar -xzvf bind-9.2.2.rc4.tar.gz

4.进入安装目录

cd bind-9.2.2rc4

5.配置、编译

./configure

make

6.安装

make install

7.生成的可执行文件位于/usr/local/sbin目录下。最重要的可执行文件为named和rndc。

8.创建链接

ln -s /usr/local/sbin/rndc /usr/sbin/rndc

ln -s /usr/local/sbin/named /usr/sbin/named

9.创建rndc.conf配置文件。

/usr/local/sbin/rndc-confgen > /etc/rndc.conf

cat /etc/rndc.conf

输出为:

Start of rndc.conf

key "rndc-key" {

algorithm hmac-md5;

secret "y9xvvfQjdWv9f/Fo7wquBg=="; //加密码和他的不一样

};

options {

default-key "rndc-key";

default-server 127.0.0.1;

default-port 953;

};

End of rndc.conf

Use with the following in named.conf, adjusting the allow list as needed:

key "rndc-key" {

algorithm hmac-md5;

secret "y9xvvfQjdWv9f/Fo7wquBg==";

};

controls {

inet 127.0.0.1 port 953

allow { 127.0.0.1; } keys { "rndc-key"; };

};

End of named.conf

10.创建rndc.key文件。将rndc.conf文件中注释部分拷贝生成如下文件:

vi /etc/rndc.key

key "rndc-key" {

algorithm hmac-md5;

secret "y9xvvfQjdWv9f/Fo7wquBg==";

};

controls {

inet 127.0.0.1 port 953

allow { 127.0.0.1; } keys { "rndc-key"; };

};

11.创建named.conf配置文件。

vi /etc/named.conf

option{directory "/var/named";};

zone "." IN {

type hint;

file "named.root";

};

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 "dream.com" IN {

type master;

file "dream.com";

allow-update { none;};

};

zone "0.168.192.in-addr.arpa" IN {

type master;

file "192.168.0";

allow-update { none; };

};

include "/etc/rndc.key";

12.创建/var/named目录

mkdir /var/named

cd /var/named

13.匿名登录到ftp站点FTP.RS.INTERNIC.NET,获取/domain目录下的named.root文件,将该文件置于/var/named目录下。

14.创建localhost文件

vi localhost.zone

$TTL 86400

$ORIGIN localhost.

@ 1D IN SOA @ root (

42 ;

3H ;

15M ;

1W ;

1D ) ;

1D IN NS @

1D IN A 127.0.0.1

15.创建named.local文件

vi named.local

$TTL 86400

@ IN SOA localhost. root.localhost. (

1997022700 ;

28800 ;

14400 ;

3600000 ;

86400 ) ;

IN NS localhost.

1 IN PTR localhost.

16.创建dream.com文件

vi dream.com

$TTL 86400

@ IN SOA dream.com root. www.dream.com. (

2003061800 ;

28800 ;

14400 ;

3600000 ;

86400 ) ;

IN NS dream.com.

IN A 192.168.0.125

IN MX 1 dream.com.

www IN A 192.168.0.125

ftp IN A 192.168.0.125

mail IN A 192.168.0.125

17.创建192.168.0文件

vi 192.168.0

$TTL 86400

@ IN SOA dream.com. root.dream.com. (

2003061800 ;

28800 ;

14400 ;

3600000 ;

86400 ) ;

IN NS dream.com.

125 IN PTR www.dream.com.

125 IN PTR ftp.dream.com.

125 IN PTR mail.dream.com.

启动脚本我没建立,先检测

hostname报告mail.dream.com ,

/usr/local/sbin/named-checkconf 居然报告互连网上的dream.com的信息,而我想要的是内网的邮件服务器的信息

/usr/local/sbin/named-checkzone

dream.com /var/named/dream.com则报告

zone dream.com/IN :has no NS records

到底这是怎么一会事?

怎么样才能说明dns确实配置好了?


由 Snoopy 在 09-12-2004 00:17 发表:


将日志文件贴出来 named -g

3是代表反向解析中你的ip段里的最后一位,这样说不确切,但我也不知道怎么解释才好,听得懂就好啦

nslookup dream.com 检查是否有解析出ip ?

还有一个是,你的配置文件中根本没有mx记录,怎么做邮件记录 ?

你的问题很多,你这样吧,到置顶中将人家已经配置好的文件移到自己路径下,然后慢慢一步步修改它,,,并且参考些文章,你会很快提高


And then in the evening light, when the bars of freedom fall

I watch the two of you in the shadows on the wall

How in the darkness steals some of the choices from my hand

Then will I begin to under


由 李暮楚 在 09-12-2004 11:28 发表:


置顶文件在哪里??

我用netconfig设置dns,设成202.96.64.68也就是公网dns,则

用nslookup dream.com显示

Server:202.96.64.68

Address:202.96.64.68#53

Non-authritative answer:

Name:dream.com

Address:220.111.47.191

若是dns是192.168.0.125,也就是装bind本机自己做dns

则报告;;connection timed out;no servers could be reached

named -g报告

starting bind9.2.4rc4 -g

using 1 cpu

loading configuration from '/etc/named.conf'

no IPV6 interfaces found

listening on IPv4 interface lo,127.0.0.1#253

listening on IPv4 interface eth0 ,192.168.0.125#53

/etc/named.conf:16:undefined ACL 'zone'

loading configuration:not found

exiting (due to fatal error)


由 Snoopy 在 09-12-2004 11:41 发表:


啊,, /etc/named.conf和正向和反向文件


And then in the evening light, when the bars of freedom fall

I watch the two of you in the shadows on the wall

How in the darkness steals some of the choices from my hand

Then will I begin to under


由 李暮楚 在 09-12-2004 12:05 发表:


3是代表反向解析中你的ip段里的最后一位,这样说不确切,但我也不知道怎么解释才好,听得懂就好啦

我的bind建立在192.168.0.125上,应该用什么数字呢?


由 wllhc 在 09-12-2004 14:18 发表:


125啦


生活好比被强奸,既然无力反抗,何不学会享受?


由 李暮楚 在 09-12-2004 14:37 发表:


125我改了,问题是named.

Published At
Categories with 服务器类
Tagged with
comments powered by Disqus