Bind外網不能訪問和解析求數
各位位,我在配置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' 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' 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.
再次感謝!!!!!!!
《解決方案》
首先你要搞清楚:BIND監聽UDP53.呵呵不是tcp53
可以用netstat -an來看看是否有53監聽了..
另看日誌,是否有請求到達伺服器,和伺服器是否允許外網訪問,策略問題等.
《解決方案》
測試你的伺服器,只能通過tcp埠訪問dns服務
udp 的53拒絕訪問
dig cgp6.cn @220.200.72.2 +tcp 成功
dig cgp6.cn @220.200.72.2 +notcp 失敗
《解決方案》
謝謝兩位!
udp 的53拒絕訪問,是不是伺服器要做什麼配置才行?還是網路防火牆做了什麼限制?謝謝!
《解決方案》
原帖由 itceolb 於 2008-7-14 10:28 發表 http://bbs.chinaunix.net/images/common/back.gif
謝謝兩位!
udp 的53拒絕訪問,是不是伺服器要做什麼配置才行?還是網路防火牆做了什麼限制?謝謝!
將iptables裡面的udp/tcp 53都打開看看
《解決方案》
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
《解決方案》
先按照2樓說得做一下,
《解決方案》
我也碰到了同樣的問題,用netstat 查看的時候只監聽127.0.0.1,和我內網ip地址的53,沒有監聽全0的地址.正在想辦法!!