免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 2080 | 回复: 3
打印 上一主题 下一主题

[DNS] 求助named.conf [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2003-06-03 11:14 |只看该作者 |倒序浏览
whoami# /usr/local/sbin/named -gc /usr/local/etc/named.conf
Jun 03 11:00:12.192 starting BIND 9.2.2rc1 -gc /usr/local/etc/named.conf
Jun 03 11:00:12.193 using 1 CPU
Jun 03 11:00:12.203 loading configuration from '/usr/local/etc/named.conf'
Jun 03 11:00:12.204 /usr/local/etc/named.conf:18: unknown option 'zone'
Jun 03 11:00:12.204 /usr/local/etc/named.conf:23: unknown option 'zone'
Jun 03 11:00:12.205 /usr/local/etc/named.conf:56: unknown option 'zone'
Jun 03 11:00:12.205 /usr/local/etc/named.conf:60: unknown option 'zone'
Jun 03 11:00:12.205 /usr/local/etc/named.conf:66: unknown option 'key'
Jun 03 11:00:12.205 /usr/local/etc/named.conf:71: unknown option 'controls'
Jun 03 11:00:12.206 /usr/local/etc/named.conf:75: '}' expected near end of file
Jun 03 11:00:12.206 loading configuration: unexpected token
Jun 03 11:00:12.206 exiting (due to fatal error)


这是我的named.conf的内容:
whoami# cat /usr/local/etc/named.conf
#
#
#
# version of an BIND 9.2.2 named.conf
#

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

// Setting up secondaries is way easier and the rough picture for this
// is explained below.
//
// If you enable a local name server, don't forget to enter 127.0.0.1
// into your /etc/resolv.conf so this server will be queried first.
// Also, make sure to enable it in /etc/rc.conf.

zone "." {
type hint;
file "named.root";
};

zone "0.0.127.IN-ADDR.ARPA" {
type master;
file "localhost.rev";
notify no&&
};

// NB: Do not use the IP addresses below, they are faked, and only
// serve demonstration/documentation purposes!
//
// Example secondary config entries. It can be convenient to become
// a secondary at least for the zone where your own domain is in. Ask
// your network administrator for the IP address of the responsible
// primary.
//
// Never forget to include the reverse lookup (IN-ADDR.ARPA) zone!
// (This is the first bytes of the respective IP address, in reverse
// order, with ".IN-ADDR.ARPA" appended.)
//
// Before starting to setup a primary zone, better make sure you fully
// understand how DNS and BIND works, however. There are sometimes
// unobvious pitfalls. Setting up a secondary is comparably simpler.
//
// NB: Don't blindly enable the examples below.  Use actual names
// and addresses instead.
//
// NOTE!!! FreeBSD runs bind in a sandbox (see named_flags in rc.conf).
// The directory containing the secondary zones must be write accessible
// to bind. The following sequence is suggested:
//
// mkdir /var/namedb/s
// chown bind.bind /var/namedb/s
// chmod 750 /var/namedb/s

zone "173.76.207.in-addr.arpa" in { type master; file "db.207.76.173";notify no; };

// Note difference in style from above to below will accomplish the same thing.

zone "bind.com" {
type master;
file "bind.com.zone";
notify no;
};

key "rndc-key" {
algorithm hmac-md5;
secret "IAVtDRkMo5MObnqyB8e8ug==";
};

controls {
inet 127.0.0.1 port 953
allow { 127.0.0.1; } keys { "rndc-key"; };
};



我真的不会怎么配置,能给我一个合用的例子吗?谢谢!

论坛徽章:
0
2 [报告]
发表于 2003-06-03 14:42 |只看该作者

求助named.conf

你的option少了一个}号

论坛徽章:
0
3 [报告]
发表于 2003-06-03 18:03 |只看该作者

求助named.conf

我的也出现了这个问题,并且我在最后也加上了“};”
是不是因为我们局域网的机器不能上internet造成的?
请高手指点

论坛徽章:
0
4 [报告]
发表于 2003-06-03 23:15 |只看该作者

求助named.conf

这个问题已经解决
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP