天天看點

奇怪的DNS問題,虛拟機下可以,真實的環境卻出錯,希望大家幫助下

http://linux.chinaunix.net/bbs/thread-1094816-1-1.html

我按照上面的文章搭建DNS,當我在虛拟機下作的時候是正确的,可以顯示的伺服器和IP的,當我在真實環境下作的時候,顯示的卻是錯誤的,

[root@rhel5 named]# nslookup 

> [url]www.world7th.net[/url]

Server:         124.74.213.68

Address:        124.74.213.68#53

Non-authoritative answer:

Name:   [url]www.world7th.net[/url]

Address: 218.83.175.155

> [url]www.world7th.org[/url]

Name:   [url]www.world7th.org[/url]

> [url]www.world7th.cn[/url]

Name:   [url]www.world7th.cn[/url]

Address: 159.226.7.162

> mail.world7th.net

Name:   mail.world7th.net

> mail.world7th.org

Name:   mail.world7th.org

> mail.world7th.cn

Name:   mail.world7th.cn

> 

 我也是第一次弄DNS,不知道是啥原因,我把我的配置檔案鐵出來,大家給個建議吧,配置檔案我和虛拟機下的都是按照上面的網址的文字搭建的,卻欻現不一樣的問題,實在有點郁悶,我把配置檔案鐵出來

gedit world7th.cn.zone

$TTL    86400

@        IN SOA    localhost root (

                    42        ; serial (d. adams)

                    3H        ; refresh

                    15M        ; retry

                    1W        ; expiry

                    1D )        ; minimum

            IN NS        world7th.cn

                IN    MX 10    mail.world7th.cn

www            IN    A            192.168.1.185

mail            IN    A            192.168.1.186

localhost    IN A        127.0.0.1        

gedit world7th.net.zone

            IN NS        world7th.net

             IN MX 10    mail.world7th.net

www            IN    A            192.168.1.181

mail            IN    A            192.168.1.182

localhost    IN A        127.0.0.1

gedit world7th.org.zone

            IN NS        world7th.org

            IN    MX    10        mail.world7th.org

www            IN    A            192.168.1.183

mail            IN    A            192.168.1.184

  上面三個都是一個類型的

 gedit 1.168.192.in-addr.local

@       IN      SOA     localhost. root.localhost.  (

                                      1997022700 ; Serial

                                      28800      ; Refresh

                                      14400      ; Retry

                                      3600000    ; Expire

                                      86400 )    ; Minimum

        IN      NS      world7th.net.

          IN      NS      world7th.org.

           IN      NS      world7th.cn.

181       IN      PTR     [url]www.world7th.net.[/url]

182        IN            PTR        mail.world7th.net.

183        IN            PTR        [url]www.world7th.org.[/url]

184        IN           PTR        mail.world7th.org

185        IN            PTR        [url]www.world7th.cn[/url]

186        IN            PTR        mail.world7th.cn

 gedit named.rfc1912.zones

gedit named.conf

//

// named.caching-nameserver.conf

// Provided by Red Hat caching-nameserver package to configure the

// ISC BIND named(8) DNS server as a caching only nameserver 

// (as a localhost DNS resolver only). 

// See /usr/share/doc/bind*/sample/ for example named configuration files.

// DO NOT EDIT THIS FILE - use system-config-bind or an editor

// to create named.conf - edits to this file will be lost on 

// caching-nameserver package upgrade.

options {

    listen-on port 53 { any; };

    listen-on-v6 port 53 { ::1; };

    directory     "/var/named";

    dump-file     "/var/named/data/cache_dump.db";

        statistics-file "/var/named/data/named_stats.txt";

        memstatistics-file "/var/named/data/named_mem_stats.txt";

    //query-source    port 53;    

    //query-source-v6 port 53;

    allow-query     { any; };

};

logging {

        channel default_debug {

                file "data/named.run";

                severity dynamic;

        };

view localhost_resolver {

    match-clients        { any; };

    match-destinations { any; };

    recursion yes;

    include "/etc/named.rfc1912.zones";

// named.rfc1912.zones:

// Provided by Red Hat caching-nameserver package 

// ISC BIND named zone configuration for zones recommended by

// RFC 1912 section 4.1 : localhost TLDs and address zones

// 

zone "." IN {

    type hint;

    file "named.ca";

zone "localdomain" IN {

    type master;

    file "localdomain.zone";

    allow-update { none; };

zone "localhost" IN {

     type master;

     file "localhost.zone";

     allow-update { none; };

zone "0.0.127.in-addr.arpa" IN {

    file "named.local";

zone "255.in-addr.arpa" IN {

     file "named.broadcast";

zone "0.in-addr.arpa" IN {

     file "named.zero";

zone "world7th.net" IN {

        type master;

    file "world7th.net.zone";

zone "world7th.org" IN {

    file "world7th.org.zone";

zone "world7th.cn" IN {

    file "world7th.cn.zone";

zone "1.168.192.in-addr.arpa" IN {

    file "1.168.192.in-addr.local";

以上就是我是以的配置檔案,我在虛拟機下可以成功的,在真實的環境下卻不行,希望大蝦給指點下,到底是那裡出來問題,我是ADSL的使用者,實驗是可以上網,我的網卡的ip是192.168.1.123,希望幫幫我吧。

本文轉自你是路人甲還是霍元甲部落格51CTO部落格,原文連結http://blog.51cto.com/world77/148010如需轉載請自行聯系原作者

world77

繼續閱讀