发新话题
打印

为什么我配置的dns服务老是nslookup不成功呢?

为什么我配置的dns服务老是nslookup不成功呢?

//这是我的主配置文件

#vi /etc/named.conf
options {
directory "/var/named";
};
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 "test.net" IN {              
type master;                        
file "test.net”                        
allow-update { none;};
};
zone "0.168.192.in-addr.arpa" IN {   
type master;
file "net.test";                    
}
include "/etc/rndc.key"



#cd /var/named
#cp localhost.zone test.net         
#vi test.net

@             IN SOA                 linux.test.net.  root.test.net.  (  
                                            42           ; serial (d. adams)  
                                            3H          ; refresh
                                            15M        ; retry
                                            1W         ;  expiry
                                            1D )        ; Minimum
                        IN                  NS             linux
            @         IN                  MX            10  mail.linux.test.
        linux         IN                   A              192.168.0.14
        mail          IN                   A              192.168.0.15
        test1       IN                   A             192.168.0.133
         www      IN                  CNAME         test1


(2)反向区域文件
    #cd /var/named
      #cp named.local net.test
     #vi net.test

@         IN SOA         linux.test.net.  root.test.net. (
                                1997022700 ; Serial
                                28800 ; Refresh
                                14400 ; Retry
                                3600000 ; Expire
                                 86400 ) ; Minimum
                   IN        NS   linux.test.net.
                  14         IN PTR         linux.test.net.
                  15         IN PTR        mail.test.net
                   133     IN PTR         test1.test.net.

修改/etc/resolv.conf文件
    #vi /etc/resolv.conf
    清除文件中原有的内容:加入如下内容:
    search test.net
      nameserver 192.168.0.14
启动DNS服务
    #service named start
    #rndc reload
    #service named restart
测试
     #nslookup
    >server 192.168.0.6
    >set type=any
    >test.net         


输出的结果却是  :    ;;connection timed out : no servers could be reached

我到底哪里出问题了?

本文由chenxiao0594 发布于Linuxsky 论坛,网址:http://bbs.linuxsky.org/thread-7039-1-1.html

TOP

发新话题