← 返回命令列表

Linux command

named.conf 命令

文件

涉及管道、覆盖或删除,执行前请先确认路径和参数。

常用示例

Basic options block

options { directory "/var/named"; };

Define zone

zone "example.com" { type master; file "example.com.zone"; };

Forward-only resolver

options { forwarders { 8.8.8.8; }; forward only; };

Allow queries from network

options { allow-query { 192.168.1.0/24; }; };

说明

named.conf is the main configuration file for BIND (Berkeley Internet Name Domain), the most widely used DNS server software. It defines zones, options, and access controls. The configuration uses a C-like syntax with blocks and statements.

参数

options
Global server options.
zone
Zone definition block.
acl
Access control list.
logging
Logging configuration.
view
View definition.
include
Include external file.

FAQ

What is the named.conf command used for?

named.conf is the main configuration file for BIND (Berkeley Internet Name Domain), the most widely used DNS server software. It defines zones, options, and access controls. The configuration uses a C-like syntax with blocks and statements.

How do I run a basic named.conf example?

Run `options { directory "/var/named"; };` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

What does options do in named.conf?

Global server options.