免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 4218 | 回复: 7
打印 上一主题 下一主题

[DNS] 一个新手的关于局域网dns的问题,急!! [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2004-10-25 14:08 |只看该作者 |倒序浏览
我这个局域网里多数是windows的机器,要用redhat as 3.0作一个dns服务器,提供域名解析,老是不成功,不知什么原因
下面是我的配置文件named.conf
[root@xxzx etc]# more 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 "dxc.slof.com" {
       type master;
        file "named.dxc";
};
zone "123.67.10.in-addr.arpa" {
        type master;
        file "named.dxc.arpa";
};
include "/etc/rndc.key";
正解区域文件"named.dxc";的内容如下
[root@xxzx named]# more named.dxc
@       IN      SOA     xxzx.dxc.slof.com.      djbking210.126.com.
( 1999032401;
10800;
3600;
604800;
86400 );
@       IN      NS      xxzx.dxc.slof.com.
dong    IN      A       10.67.123.65

主机名xxzx,ip:10.67.123.13,linux操作系统,用来做dns服务器
主机名dong,ip:10.67.123.65,windows操作系统,用来做www服务器

我的目的就是在其他机器的地址浪里出入http://dong.dxc.slof.com,可以访问网页,而不必输入ip,可是不成功


Pinging 10.67.123.65 with 32 bytes of data:

Reply from 10.67.123.65: bytes=32 time<1ms TTL=128
Reply from 10.67.123.65: bytes=32 time<1ms TTL=128
Reply from 10.67.123.65: bytes=32 time<1ms TTL=128
Reply from 10.67.123.65: bytes=32 time<1ms TTL=128


C:\Documents and Settings\Administrator>;ping dong.dxc.slof.com
Ping request could not find host dong.dxc.slof.com. Please check the name and tr
y again.

不知道什么原因,是不时windows机器和linux机器还有设置域名,怎样设置,我第一次坐这个,不懂啊,
请有经验的大虾执教解惑!!

论坛徽章:
1
荣誉版主
日期:2011-11-23 16:44:17
2 [报告]
发表于 2004-10-25 14:51 |只看该作者

一个新手的关于局域网dns的问题,急!!

將 /var/log/messages 關於 named 部份的內容貼一貼?

论坛徽章:
0
3 [报告]
发表于 2004-10-25 15:11 |只看该作者

一个新手的关于局域网dns的问题,急!!

默认情况下53端口是不对外开放的,你可以试试linux下配自己为dns,然后解析解析看时候成功。
iptables -t filter -I INPUT -p udp --dport 53 -j ACCEPT
service iptables save
然后重启机器,试试。

论坛徽章:
0
4 [报告]
发表于 2004-10-25 15:17 |只看该作者

一个新手的关于局域网dns的问题,急!!

刚刚开始学习dns,对于下面一行是什么意思,我还有没有想通
@ IN NS xxzx.dxc.slof.com.

论坛徽章:
1
荣誉版主
日期:2011-11-23 16:44:17
5 [报告]
发表于 2004-10-25 16:29 |只看该作者

一个新手的关于局域网dns的问题,急!!

參考一下:
http://bbs.chinaunix.net/forum/16/20040616/349128.html

论坛徽章:
0
6 [报告]
发表于 2004-10-25 17:37 |只看该作者

一个新手的关于局域网dns的问题,急!!

Red Hat Enterprise Linux AS release 3 (Taroon Update 2)
Kernel 2.4.21-15.EL on an i686
login: djb
Password:
Last login: Mon Oct 25 13:41:05 from 10.67.123.65
[djb@xxzx djb]$ su -
Password:
[root@xxzx root]# cd /var
[root@xxzx var]# ls
account  empty  lib    log         named  preserve  tmp     www
cache    ftp    local  lost+found  nis    run       tux     yp
db       gdm    lock   mail        opt    spool     webmin
[root@xxzx var]# cd log
[root@xxzx log]# ls
audit       cups     ksyms.4    messages    samba             squid
audit.d     dmesg    ksyms.5    messages.1  scrollkeeper.log  vbox
boot.log    gdm      ksyms.6    messages.2  secure            wtmp
boot.log.1  httpd    lastlog    news        secure.1          XFree86.0.log
boot.log.2  ksyms.0  mail       rpmpkgs     secure.2          XFree86.0.log.old
cron        ksyms.1  maillog    rpmpkgs.1   spooler           XFree86.1.log
cron.1      ksyms.2  maillog.1  rpmpkgs.2   spooler.1
cron.2      ksyms.3  maillog.2  sa          spooler.2
[root@xxzx log]# more messages
Oct 25 04:02:05 xxzx syslogd 1.4.1: restart.
Oct 25 07:44:13 xxzx login(pam_unix)[3660]: session opened for user djb by (uid=
0)
Oct 25 07:44:13 xxzx  -- djb[3660]: LOGIN ON pts/1 BY djb FROM 10.67.123.65
Oct 25 07:44:19 xxzx su(pam_unix)[3698]: session opened for user root by djb(uid
=500)
Oct 25 07:58:03 xxzx login(pam_unix)[3765]: session opened for user djb by (uid=
0)
Oct 25 07:58:03 xxzx  -- djb[3765]: LOGIN ON pts/2 BY djb FROM 10.67.123.65
Oct 25 07:59:15 xxzx su(pam_unix)[3804]: session opened for user root by djb(uid
=500)
Oct 25 08:15:16 xxzx named: named 关闭 failed
Oct 25 08:15:18 xxzx named[3895]: starting BIND 9.2.2 -u named
Oct 25 08:15:18 xxzx named[3895]: using 1 CPU
Oct 25 08:15:18 xxzx named: named 启动 succeeded
Oct 25 08:15:18 xxzx named[3895]: loading configuration from '/etc/named.conf'
Oct 25 08:15:18 xxzx named[3895]: no IPv6 interfaces found
Oct 25 08:15:18 xxzx named[3895]: listening on IPv4 interface lo, 127.0.0.1#53
Oct 25 08:15:18 xxzx named[3895]: listening on IPv4 interface eth0, 10.67.123.13
#53
Oct 25 08:15:18 xxzx named[3895]: command channel listening on 127.0.0.1#953
Oct 25 08:15:18 xxzx named[3895]: zone 123.67.10.in-addr.arpa/IN: could not find
NS and/or SOA records
rds
rds
97022700
xpected end of input named[3895]: dns_rdata_fromtext: named.dxc:1: near eol: une
d.dxc: unexpected end of input5]: zone dxc.slof.com/IN: loading master file name
Oct 25 08:15:18 xxzx named[3895]: zone localhost/IN: loaded serial 42
Oct 25 08:15:18 xxzx named[3895]: running
Oct 25 08:15:53 xxzx su(pam_unix)[3698]: session closed for user root
Oct 25 08:15:54 xxzx login(pam_unix)[3660]: session closed for user djb
Oct 25 08:15:56 xxzx su(pam_unix)[3804]: session closed for user root
Oct 25 08:15:58 xxzx login(pam_unix)[3765]: session closed for user djb
Oct 25 08:16:00 xxzx su(pam_unix)[2794]: session closed for user root
Oct 25 08:16:01 xxzx login(pam_unix)[2755]: session closed for user djb
0)
Oct 25 08:42:23 xxzx  -- djb[3930]: LOGIN ON pts/0 BY djb FROM 10.67.123.65
=500)
)
root”
nf.xml.mandatory”指向位于 0 的只读配置源解析的地址“xml:readonly:/etc/gconf/gco
Oct 25 08:48:02 xxzx gconfd (root-4097): 地址“xml:readwrite:/root/.gconf”解析
为位于 1 的可写入配置源
nf.xml.defaults”指向位于 2 的只读配置源 解析的地址“xml:readonly:/etc/gconf/gco
endpoint is not connectedtd[4107]: warning: can't get client address: Transport
Oct 25 08:48:06 xxzx kernel: ide-floppy driver 0.99.newide
Oct 25 08:48:06 xxzx kernel: hdc: attached ide-cdrom driver.
Oct 25 08:48:06 xxzx kernel: hdc: ATAPI 48X CD-ROM drive, 128kB Cache, DMA
Oct 25 08:48:06 xxzx kernel: Uniform CD-ROM driver Revision: 3.12
e!
Oct 25 08:51:54 xxzx named[3895]: shutting down: flushing changes
Oct 25 08:51:54 xxzx named[3895]: stopping command channel on 127.0.0.1#953
Oct 25 08:51:54 xxzx named[3895]: no longer listening on 127.0.0.1#53
Oct 25 08:51:54 xxzx named[3895]: no longer listening on 10.67.123.13#53
Oct 25 08:51:54 xxzx named[3895]: exiting
Oct 25 08:51:54 xxzx named:  succeeded
Oct 25 08:51:56 xxzx named[4236]: starting BIND 9.2.2 -u named
Oct 25 08:51:56 xxzx named[4236]: using 1 CPU
Oct 25 08:51:56 xxzx named[4236]: loading configuration from '/etc/named.conf'
Oct 25 08:51:56 xxzx named: named 启动 succeeded
Oct 25 08:51:56 xxzx named[4236]: no IPv6 interfaces found
Oct 25 08:51:56 xxzx named[4236]: listening on IPv4 interface lo, 127.0.0.1#53
#53
Oct 25 08:51:56 xxzx named[4236]: command channel listening on 127.0.0.1#953
: unexpected end of inputd[4236]: dns_rdata_fromtext: named.dxc.arpa:1: near eol
file named.dxc.arpa: unexpected end of input.10.in-addr.arpa/IN: loading master
97022700
xpected end of input named[4236]: dns_rdata_fromtext: named.dxc:1: near eol: une
d.dxc: unexpected end of input6]: zone dxc.slof.com/IN: loading master file name
Oct 25 08:51:56 xxzx named[4236]: zone localhost/IN: loaded serial 42
Oct 25 08:51:56 xxzx named[4236]: running
Oct 25 10:22:17 xxzx su(pam_unix)[3969]: session closed for user root
Oct 25 10:22:19 xxzx login(pam_unix)[3930]: session closed for user djb
0)
Oct 25 10:39:36 xxzx  -- djb[4405]: LOGIN ON pts/0 BY djb FROM 10.67.123.65
=500)
Oct 25 10:44:21 xxzx vncserver: vncserver 启动 succeeded
Oct 25 10:53:13 xxzx su(pam_unix)[4443]: session closed for user root
Oct 25 10:53:15 xxzx login(pam_unix)[4405]: session closed for user djb
0)
Oct 25 11:02:53 xxzx  -- djb[4528]: LOGIN ON pts/0 BY djb FROM 10.67.123.65
=500)
Oct 25 11:38:43 xxzx su(pam_unix)[4566]: session closed for user root
Oct 25 11:38:44 xxzx login(pam_unix)[4528]: session closed for user djb
0)
Oct 25 13:41:05 xxzx  -- djb[4690]: LOGIN ON pts/0 BY djb FROM 10.67.123.65
=500)
Oct 25 17:40:59 xxzx login(pam_unix)[4690]: session closed for user djb
Oct 25 17:40:59 xxzx su(pam_unix)[4728]: session closed for user root
0)
Oct 25 17:43:06 xxzx  -- djb[4897]: LOGIN ON pts/0 BY djb FROM 10.67.123.65
=500)

论坛徽章:
0
7 [报告]
发表于 2004-10-25 17:47 |只看该作者

一个新手的关于局域网dns的问题,急!!

@ IN NS xxzx.dxc.slof.com

@是区域名称的简写,如果在正解区域文件里遇到@,则替换成在named.conf中声明的区域名称,如dxc.slof.com
IN 代表class字段,代表所制定的网络类型,通常固定为IN(internet)
xxzx.dxc.slof.com 声明域名服务器主机名称,就是此部dns的完整域名

论坛徽章:
0
8 [报告]
发表于 2004-10-25 21:43 |只看该作者

一个新手的关于局域网dns的问题,急!!

那么xxzx.dxc.slof.com. 的ip地址又在什么地方给出的呢?
特别是里面配置了多个ns的时候。
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP