LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
12
返回列表 发新帖
楼主: nothing9

我的DNS哪里有问题

[复制链接]
发表于 2005-3-24 17:43:09 | 显示全部楼层
你的 /etc/resolv.conf 被系统好像是bind 自动改掉了.去看看吧,我就是找原因找了半天,
原来系统也会偷偷摸摸.
回复 支持 反对

使用道具 举报

发表于 2005-3-24 20:55:43 | 显示全部楼层
Post by angelsss
能ping dns.hello.tm 应该说明你解析可以的。
那也许是你httpd.conf配置有问题吧,或者其他,


能ping ,是因为他的/etc/hosts,而不是bind.


Post by nothing9
# nslookup
;; connection timed out; no servers could be reached

sometimes there's something wrong with bind.
# /etc/init.d/bind9 restart
Stopping domain name service: namedrndc: connect failed: connection refused


这不明摆了说你的bind没有动起来么?用netstat -an | grep 53看看有没有named在监听,"connection refused"是因为rndc没有配置好,这个暂时先别管他,直接使用kill杀死named进程,然后再启动他. 好好检查你的/etc/resolv.conf和防火墙。

你可以试试这样:
$TTL 86400
$ORIGIN hello.tm.
hello.tm. IN SOA dns.hello.tm. root.dns.hello.tm. (
1 ; serial
28800 ; refresh
7200 ; retry
604800 ; expire
86400 ; ttl
)

IN NS dns.hello.tm.
IN A 192.168.5.1

dns IN A 192.168.5.1
www IN A 192.168.5.1

如果确实是named的问题,那最好的办法就是将你的tail -n 40 /var/log/message贴上来,log对named的排错是很有帮助的.
回复 支持 反对

使用道具 举报

发表于 2005-3-25 09:37:18 | 显示全部楼层
Post by bpxyz
能ping ,是因为他的/etc/hosts,而不是bind.


这不明摆了说你的bind没有动起来么...........


IN NS dns.hello.tm.
IN A 192.168.5.1

dns IN A 192.168.5.1
www IN A 192.168.5.1

.



请教楼上:  IN NS dns.hello.tm.
IN A 192.168.5.1
.......
这第2句 是不是指定 NS 服务器的IP?
回复 支持 反对

使用道具 举报

发表于 2005-3-25 14:50:34 | 显示全部楼层
/etc/hosts 文件
第一行是咱回事,后面的....去掉试试。。。,第三行192.168.5.1 www.hello.tm 也可以去掉。可以后面的dns的 IN CNAME 来解决。

/etc/resolv.conf改为下面的
search hello.tm
nameserver 127.0.0.1
试试。因为你的dns是在本地是运行的服务。。


192.168.5.zone文件呢?

而且至少你要学会一些测试dns的方法。。
回复 支持 反对

使用道具 举报

发表于 2005-3-25 14:52:41 | 显示全部楼层
另外,看了你的/etc/bind/named.conf文件,你后面手工的添加的也应该写上绝对的路径,因为你前面的部分都是这样的。。
回复 支持 反对

使用道具 举报

 楼主| 发表于 2005-3-26 00:57:41 | 显示全部楼层
# /etc/init.d/bind9 restart
Stopping domain name service: named.
Starting domain name service: named.

#netstat -an |grep 53
tcp        0      0 221.23.64.xx:53      0.0.0.0:*               LISTEN
tcp        0      0 127.0.0.1:53            0.0.0.0:*               LISTEN
tcp        0      0 127.0.0.1:953           0.0.0.0:*               LISTEN
tcp6       0      0 ::1:953                 :::*                    LISTEN
udp        0      0 221.23.64.xx:53      0.0.0.0:*
udp        0      0 127.0.0.1:53            0.0.0.0:*
udp        0      0 221.23.64.xx:32828   192.168.5.1:53          ESTABLISHED

问题出在 /etc/bind/hello.tm.zone 手动添加的部分打掉了一个   {
根据上面的输出,bind应该正常启动了吧

还需解决的问题
我的 /etc/bind/ 下没有 192.168.5.zone,针对我的情况,不知该如何写?
要想用 www.hello.tm 来访问 /home/myuser/pub_html,需要配置什么?
目前无法用 192.168.5.1 来访问 默认的apache测试页,只能用localhost
已配置可用 localhost/~myuser访问到用户主页。
回复 支持 反对

使用道具 举报

发表于 2005-3-27 00:47:14 | 显示全部楼层
$TTL 86400
@       IN      SOA     @       lwww.163.com (
                        29 ; serial
                        28800 ; refresh
                        7200 ; retry
                        604800 ; expire
                        86400 ; ttk
                        )
@       IN      NS      192.168.5.3.
        MX      1       ns.xx.cn.
250     IN      PTR     squid.xx.cn.

这是我的东西 对应的你自己改了

DNS我是早做过了 总体感觉是“简单” 我只动三个地方:

/etc/resolv.conf
/etc/named.conf
/var/named(这个目录我是在named.conf中指定的)
回复 支持 反对

使用道具 举报

 楼主| 发表于 2005-3-28 19:34:05 | 显示全部楼层
# nslookup
> localhost
Server:         192.168.5.1
Address:        192.168.5.1#53

Name:   localhost
Address: 127.0.0.1
> hello.tm
Server:         192.168.5.1
Address:        192.168.5.1#53

** server can't find hello.tm: SERVFAIL
> dns.hello.tm
Server:         192.168.5.1
Address:        192.168.5.1#53

** server can't find dns.hello.tm: SERVFAIL
> exit
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表