设置合并Google DNS和OpenNIC的本地DNS服务器


2

我想在我的本地计算机上设置bind9,以便将com,de,net等常见的DNS查询转发到Google DNS,并将OpenNic中的其他自定义查询(如bbs,dyn,free)转发到OpenNIC-DNS服务器。

dns-server不应该从OpenNIC-DNS-Servers进行缓存或下载所有区域文件。

你能帮助我吗?

这是我的不工作配置:

//named.conf:
include "/etc/bind/named.conf.options";
include "/etc/bind/named.conf.local";
include "/etc/bind/named.conf.default-zones";

//named.conf.default-zones
zone "localhost" {
    type master;
    file "/etc/bind/db.local";
};

zone "127.in-addr.arpa" {
    type master;
    file "/etc/bind/db.127";
};

zone "0.in-addr.arpa" {
    type master;
    file "/etc/bind/db.0";
};

zone "255.in-addr.arpa" {
    type master;
    file "/etc/bind/db.255";
};

// named.conf.local:
// replace all '...' with the following:
//      type forward;
//      forwarders {78.138.98.82; 78.138.97.33;};
//      forward only;
zone "dns.opennic.glue" in { ... };
zone "bbs" in { ... };
zone "dyn" in { ... };
zone "free" in { ... };
zone "fur" in { ... };
zone "geek" in { ... };
zone "gopher" in { ... };
zone "indy" in { ... };
zone "ing" in { ... };
zone "micro" in { ... };
zone "neo" in { ... };
zone "null" in { ... };
zone "opennic.glue" in { ... };
zone "oss" in { ... };
zone "oz" in { ... };
zone "parody" in { ... };
zone "pirate" in { ... };

// named.conf.options
options {
    directory "/var/cache/bind";
    forwarders { 8.8.8.8; 8.8.4.4; };
    forward only;
    dnssec-validation auto;
    auth-nxdomain no;
};

这里是google.com和grep.geek的traceroute的输出:

# tracerout google.com
traceroute to google.com (173.194.116.192), 64 hops max
 1   192.168.178.1 (192.168.178.1) 1.436ms 1.195ms 1.195ms 
 2   80.69.104.84 (80.69.104.84) 10.818ms 9.268ms 16.093ms 
 3   *  *  * 
 4   72.14.213.197 (72.14.213.197) 41.229ms 36.026ms 36.034ms 
 5   72.14.238.46 (72.14.238.46) 11.824ms 9.628ms 9.822ms 
 6   66.249.94.143 (66.249.94.143) 12.487ms 17.118ms 19.893ms 
 7   173.194.116.192 (173.194.116.192) 10.171ms 9.559ms 9.874ms

traceroute grep.geek
traceroute to hit-nxdomain.opendns.com (67.215.65.132), 64 hops max
 1   192.168.178.1 (192.168.178.1) 2.605ms 2.242ms 1.218ms 
 2   80.69.104.84 (80.69.104.84) 9.502ms 11.883ms 13.299ms 
 3   80.69.105.209 (80.69.105.209) 9.645ms 9.366ms  * 
 4   80.69.107.214 (80.69.107.214) 13.783ms 11.845ms 12.632ms 
 5   80.69.107.21 (80.69.107.21) 15.165ms 17.931ms 23.894ms 
 6   80.69.107.209 (80.69.107.209) 16.423ms 21.342ms 18.070ms 
 7   80.69.107.9 (80.69.107.9) 21.847ms 19.817ms 19.860ms 
 8   84.116.197.253 (84.116.197.253) 32.887ms 40.201ms 36.557ms 
 9   84.116.133.230 (84.116.133.230) 36.050ms 31.760ms 31.942ms 
10   195.66.225.70 (195.66.225.70) 31.176ms 30.835ms 30.011ms 
11   67.215.65.132 (67.215.65.132) 34.920ms 34.592ms 42.566ms


我已经尝试过这样,但是当我尝试访问具有openNic域的服务器时,我只得到一个错误页面。 (错误页面: website-unavailable.com/...
user1861174

也许发布一个结果 tracert 对于两种类型的扩展中的每一种(比如.com和.bbs),我们可以看到它是如何被路由的。另外,据我所知,“website-unavailable.com”是一个OpenDNS的东西,它不是OpenNIC。 :)您尝试为每种类型的查找转发哪些DNS服务器?
Ƭᴇcʜιᴇ007

对于谷歌DNS我使用8.8.8.8和8.8.4.4和OpenNIC DNS 78.138.98.82和78.138.97.33
user1861174

我只是试图达到opennic.glue,这确实适用于我的DNS服务器。在我的配置文件中,它也显示为区域。
user1861174

Answers:


By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.