- 论坛徽章:
- 0
|
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"; };
};
我真的不会怎么配置,能给我一个合用的例子吗?谢谢! |
|