由 baosmile 在 03-31-2004 23:14 发表:
求助! 关于dns的问题
我配置了dns,在本机上解释本域的域名没问题,但在同一个局域网的机器就是连不上.这该怎么办呢?我在named.conf的option中加上了
allow-query { any; };
allow-recursion {any; };
还有我加上了
forward only;
forwarders { 202.198.168.3; };
这对不对呀?我还是不能解释其他域的名字.
谢谢高手赐教.
由 Snoopy 在 04-01-2004 01:24 发表:
将
forward only;
forwarders { 202.198.168.3; };
位置换一下看看,或是将forward only;去掉
And then in the evening light, when the bars of freedom fall
I watch the two of you in the shadows on the wall
How in the darkness steals some of the choices from my hand
Then will I begin to under
由 seablue 在 04-01-2004 04:00 发表:
把
forward only;
forwarders { 202.198.168.3; };
去掉
清风秋月黑白子,
解语生香共婵娟。
由 Snoopy 在 04-01-2004 04:51 发表:
只剩下这句forwarders { 202.198.168.3; };
看下是否可以 ?
And then in the evening light, when the bars of freedom fall
I watch the two of you in the shadows on the wall
How in the darkness steals some of the choices from my hand
Then will I begin to under
由 baosmile 在 04-02-2004 01:21 发表:
还是不行, 最可怕的是 加上
forward only;
forwarders { 202.198.168.3; };
这两行就根没加没什么两样,如下:
nslookup www.jlu.edu.cn 219.217.56.137
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.
;; connection timed out; no servers could be reached
竟然no servers could be reached,如果我解析不了应该反回信息吧.
不过我的问题还不止这些,我还不能解析其他域名呢.我是自己随便建的域,那我能不能通过根名字服务器解析其他域名呢?不过用forwarders总行吧?
现在先能解析其它域名就好了,请大家指点一二,谢谢啦.
由 Snoopy 在 04-02-2004 01:25 发表:
你将你所有的dns配置文件贴上来,这样说哪够 ?
之前我是以为你只能解析自己不能解析别人,,
And then in the evening light, when the bars of freedom fall
I watch the two of you in the shadows on the wall
How in the darkness steals some of the choices from my hand
Then will I begin to under
由 baosmile 在 04-02-2004 10:39 发表:
好,现在就来啦:
// 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;
listen-on { 219.217.56.137; };
forwarders { 202.198.168.3; }; //把 forward only; 去了.
allow-query { any; };
allow-recursion {any; };
};
//
// 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 "bao.jlu.edu.cn" IN {
type master;
file "bao.zone";
allow-update { none; };
};
zone "56.217.219.in-addr.arpa" IN {
type master;
file "bao.rr.zone";
allow-update { none; };
};
include "/etc/rndc.key";
现在是能解析bao.jlu.edu.cn中的域名,其他的不能.
这是bao.zone文件:
$ORIGIN bao.jlu.edu.cn.
$TTL 86400
@ IN SOA billy.bao.jlu.edu.cn. root.mail.bao.jlu.edu.cn. (
2004032817 ; serial (d. adams)
3H ; refresh
15M ; retry
1W ; expiry
1D ) ; minimum
IN NS billy.bao.jlu.edu.cn.
IN MX 10 mail.bao.jlu.edu.cn.
IN A 219.217.56.137
yyz IN A 219.217.56.136
billy IN A 219.217.56.137
ftp IN CNAME billy
mail IN CNAME billy
www IN CNAME billy
这是bao.rr.zone文件:
$ORIGIN 56.217.219.in-addr.arpa.
$TTL 86400
@ IN SOA billy.bao.jlu.edu.cn. root.billy.bao.jlu.edu.cn. (
2004032817 ; serial (d. adams)
3H ; refresh
15M ; retry
1W ; expiry
1D ) ; minimum
IN NS billy.bao.jlu.edu.cn.
137 IN PTR billy.bao.jlu.edu.cn.
136 IN PTR yyz.bao.jlu.edu.cn.
这么贴信息够不够?不知道有什么毛病.为什么不能解析其他的域名呢?
谢谢版主,谢谢大家.
由 Snoopy 在 04-02-2004 10:44 发表:
看不出有什么问题,你的/etc/resolv.conf肯定是设自己ip
或许这样,你可以将别人的配置文件先拷过来修改用先,有些错误你就会发现出来,之前我也是找了很久都找不出自己的错误,我就用此办法
And then in the evening light, when the bars of freedom fall
I watch the two of you in the shadows on the wall
How in the darkness steals some of the choices from my hand
Then will I begin to under
由 baosmile 在 04-02-2004 14:59 发表:
关于一个局域网不能访问的问题解决了,原因是 iptables 的设置不对,加上
iptables -A INPUT -p udp -d 219.217.56.137 --dport domain -i eth0 -j ACCEPT
iptables -A INPUT -p tcp -d 219.217.56.137 --dport domain -i eth0 -j ACCEPT
就好了,可是还是不能解析其他的域名,是不是自己的域名要注册才行阿?真痛苦!!
由 Snoopy 在 04-02-2004 15:23 发表:
你做为内部的不需要注册,,外部的不注册也可以,但别人解析不到你
上面你的iptables里的domain代表什么,应该为53才对,
And then in the evening light, when the bars of freedom fall
I watch the two of you in the shadows on the wall
How in the darkness steals some of the choices from my hand
Then will I begin to under
由 Snoopy 在 04-02-2004 15:26 发表:
我贴下我作为内部的dns给你参考一下,snoopy.gov,b011306.com
named.conf
options {
directory "/var/named";
forwarders { 202.116.128.1; };
notify yes;
/*
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;
};
logging {
channel LAMER_log {
file "/var/log/dns/dns-lamer.log" versions 3 size 10m;
severity info;
print-severity yes; print-time yes;
};
channel SEC_log {
file "/var/log/dns/dns-sec.log" versions 3 size 10m;
severity info;
print-severity yes; print-time yes;
};
channel STAT_log {
file "/var/log/dns/dns-stat.log" versions 3 size 10m;
severity info;
print-severity yes; print-time yes;
};
category lame-servers { LAMER_log; };
category security { SEC_log; };
};
/* category cname { null; };
category statistics { STAT_log; };*/
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 "snoopy.gov" {
type master;
file "snoopy.gov";
allow