[DNS] DNS的问题

weixin_38054680 2005-12-15 06:40:23

我在局域网内架设一台DNS,为什么只能反向解析不能正向解析?
named.conf

// generated by named-bootconf.pl

acl test {
       192.168.123/24;
};


options {
        directory "/var/named";
        pid-file "named.pid";

   forward first;
   forwarders {202.99.8.1;};

        /*
         * 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;
};

//
// a caching only nameserver config
//

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  "xiaobao.com" IN {
         type master;
         file "local.xiaobao.com";
         allow-update { none; };
};

zone "123.168.192.in-addr.arpa" IN {
        type master;
        file "123.168.192.in-addr.arpa";
        allow-update { none; };
};

include "/etc/rndc.key";




local.xiaobao.com

$TTL    86400
@       IN      SOA     nameserver.xiaobao.com. root.nameserver.xiaobao.com. (
                        200512114
                        28800
                        14400
                        3600000
                        86400 )
@       IN      NS      nameserver.xiaobao.com.

ebiz-qiantai   IN   A   192.168.123.55
nameserver.xiaobao.com    IN    A   192.168.123.33



123.168.192.in-addr.arpa

$TTL    86400
@        IN        SOA        nameserver.xiaobao.com. root.nameserver.xiaobao.com. (
                        200512112
                        28800
                        14400
                        3600000
                        86400 )
@       IN      NS      nameserver.xiaobao.com.

33      IN      PTR      nameserver.xiaobao.com.
55     IN      PTR       ebiz-qiantai.

用named-checkzone检查没问题



还有个问题为什么过了一段时间用named-checkzone检查出现以下错误提示:
123.168.192.in-addr.arpa:1: unknown option '$TTL'
123.168.192.in-addr.arpa:12: unexpected token near end of file

这个怎么去解决,谢谢!
...全文
113 1 打赏 收藏 转发到动态 举报
写回复
用AI写文章
1 条回复
切换为时间正序
请发表友善的回复…
发表回复

477

社区成员

发帖
与我相关
我的任务
社区描述
其他技术讨论专区
其他 技术论坛(原bbs)
社区管理员
  • 其他技术讨论专区社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧