免费注册 查看新帖 |

Chinaunix

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

[DNS] Bind外网不能访问和解析求数 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2008-07-11 13:06 |只看该作者 |倒序浏览
各位位,我在配置Bind时,外网不能访问和解析,内网能访问Bind和解析.
实正不知道是什么原因导致,所以,在此请教一下各位,谢谢!
说是防火墙原因嘛,但能过将53端口配置成web服务(apache),外网可能正常访问

环境如下:
1. 外网IP:220.200.72.2
2. 内网IP:10.1.3.12
3. 通过NAT将内网转为外网IP,
4. OS:Redhat Linux 8
5. 没有设置iptables
# iptables -L
Chain INPUT (policy ACCEPT)
target     prot opt source               destination         

Chain FORWARD (policy ACCEPT)
target     prot opt source               destination         

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination   
6. 在本机的测试-通过内网IP
   nslookup
Note:  nslookup is deprecated and may be removed from future releases.
Consider using the `dig' or `host' programs instead.  Run nslookup with
the `-sil[ent]' option to prevent this message from appearing.
> server 10.1.3.12
Default server: 10.1.3.12
Address: 10.1.3.12#53
> set type=soa
> cgp6.cn
Server:         10.1.3.12
Address:        10.1.3.12#53

cgp6.cn
        origin = ns1.cgp6.cn
        mail addr = admin_dns.cgp6.cn
        serial = 2008071002
        refresh = 10800
        retry = 3600
        expire = 3600000
        minimum = 86400
> set type=a
> www.cgp6.cn
Server:         10.1.3.12
Address:        10.1.3.12#53

www.cgp6.cn     canonical name = wcname.cgp6.cn.
Name:   wcname.cgp6.cn
Address: 220.200.72.4
Name:   wcname.cgp6.cn
Address: 220.200.72.5
Name:   wcname.cgp6.cn
Address: 220.200.72.2
Name:   wcname.cgp6.cn
Address: 220.200.72.3

7. 在本机的测试-通过外网IP
nslookup
Note:  nslookup is deprecated and may be removed from future releases.
Consider using the `dig' or `host' programs instead.  Run nslookup with
the `-sil[ent]' option to prevent this message from appearing.
> server 220.200.72.2
Default server: 220.200.72.2
Address: 220.200.72.2#53
> set type=soa
> cgp6.cn
;; connection timed out; no servers could be reached
> set type=a
> www.cgp6.cn
;; connection timed out; no servers could be reached
>

8.我能确定可以ping 通这个服务器的外网IP. 外网的53端口也可以访问(通过配置成一个web服务,apache)

9.telnet ip结果
   telnet 220.200.72.2 53
Trying 220.200.72.2...
Connected to jltdb (220.200.72.2).
Escape character is '^]'.
Connection closed by foreign host.

   telnet 10.1.3.12 53
Trying 10.1.3.12...
Connected to 10.1.3.12 (10.1.3.12).
Escape character is '^]'.
Connection closed by foreign host.


再次感谢!!!!!!!

论坛徽章:
0
2 [报告]
发表于 2008-07-11 17:21 |只看该作者
首先你要搞清楚:BIND监听UDP53.呵呵不是tcp53

可以用netstat -an来看看是否有53监听了..

另看日志,是否有请求到达服务器,和服务器是否允许外网访问,策略问题等.

论坛徽章:
0
3 [报告]
发表于 2008-07-13 00:17 |只看该作者
测试你的服务器,只能通过tcp端口访问dns服务
udp 的53拒绝访问
dig cgp6.cn @220.200.72.2 +tcp 成功
dig cgp6.cn @220.200.72.2 +notcp 失败

论坛徽章:
0
4 [报告]
发表于 2008-07-14 10:28 |只看该作者
谢谢两位!
udp 的53拒绝访问,是不是服务器要做什么配置才行?还是网络防火墙做了什么限制?谢谢!

论坛徽章:
8
综合交流区版块每周发帖之星
日期:2015-12-02 15:03:53数据库技术版块每日发帖之星
日期:2015-10-02 06:20:00IT运维版块每日发帖之星
日期:2015-10-02 06:20:00IT运维版块每日发帖之星
日期:2015-09-14 06:20:00金牛座
日期:2014-10-10 11:23:34CU十二周年纪念徽章
日期:2013-10-24 15:41:34酉鸡
日期:2013-10-19 10:17:1315-16赛季CBA联赛之北京
日期:2017-03-06 15:12:44
5 [报告]
发表于 2008-07-14 11:47 |只看该作者
原帖由 itceolb 于 2008-7-14 10:28 发表
谢谢两位!
udp 的53拒绝访问,是不是服务器要做什么配置才行?还是网络防火墙做了什么限制?谢谢!



将iptables里面的udp/tcp 53都打开看看

论坛徽章:
0
6 [报告]
发表于 2008-07-14 13:32 |只看该作者
iptables 都没有设置了.
没有设置iptables
# iptables -L
Chain INPUT (policy ACCEPT)
target     prot opt source               destination         

Chain FORWARD (policy ACCEPT)
target     prot opt source               destination         

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination

论坛徽章:
0
7 [报告]
发表于 2008-07-16 08:03 |只看该作者
先按照2楼说得做一下,

论坛徽章:
0
8 [报告]
发表于 2008-08-18 12:05 |只看该作者
我也碰到了同样的问题,用netstat 查看的时候只监听127.0.0.1,和我内网ip地址的53,没有监听全0的地址.正在想办法!!
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

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

清除 Cookies - ChinaUnix - Archiver - WAP - TOP