红联Linux门户
Linux帮助

windows DNS与 linux DNS通讯

发布时间:2007-03-30 10:25:00来源:红联作者:Hbhmycg
一 、linux 作为主DNS ,windows 作为辅助DNS

1、配置linux 作为主dns服务器,配置如下:

A:配置/etc/named.conf ,建立benet.com正向解析区域。

B:在/var/named下建立正向解析库文件 named.benet

C:启动named服务,并关闭linux防火墙

2、安装windows 2003 server 并建立DNS ,配置如下:

A:建立新的区域benet.com,作为辅助DNS ,主服务器地址为linux DNS IP ADDRESS

B:完成区域建立后,可以看到学习到了linux DNS的正向解析记录。

C:如果在linux服务器下更新新的记录,需增加SOA的serial,以便windows DNS可以继续学习。

D:重启windows DNS服务,在区域中选择“从主服务器复制”,来更新数据库解析文件

二 、windows 作为主DNS ,linux 作为辅助DNS

1、在windows下配置DNS:

A: 在windows DNS下建立主DNS,建立正向解析区域benet.com

B: 在benet.com区域中,建立正向解析库文件,建立主机记录(CNAME、MX)

C:默认的windows DNS 的SOA 的 serial 为 1,为了使linux可以更新解析库文件,linux 默认的serial 是42 ,所以将windows的改为 43。

D:在benet.com的区域属性里,选择“区域复制--允许区域复制---到所有服务器“,保存

E: 重新启动DNS,配置完毕

2、配置 linux DNS:

A: 配置 /etc/named.conf

// generated by named-bootconf.pl


options
{
directory "/var/named";

/*
* 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;
};


//

// a caching only nameserver config
//

controls
{
inet 127.0.0.1 allow { localhost; } keys { rndckey;

};

zone "." IN {

type hint;

file "named.ca";

};



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

type slave;

file "benet.com.dns"; //此文件名为windows 默认的dns配置文件名,可以任意设定(如 named.benet)

masters { 192.168.0.187; }; //192.168.0.187 为windows DNS Server

# allow-update { none; };
};

include "/etc/rndc.key";

B: 配置完毕,重新启动named服务。

C:在/var/named下可以发现 test.com.dns 文件

D:打开benet.com.dns,可以看到windows下的主机记录

注意:

A:可以从windows下的事件查看器和linux 的/var/log/messages 下,查看日志记录

B:windows DNS的配置文件在system32/dns下。
文章评论

共有 1 条评论

  1. omiga 于 2007-03-30 16:27:23发表:

    是青鸟学子啊,
    这要顶!
    不错,学得很活.