大网数据广告活动
服务器运维问答

Print the BIND9 default configuration

· 52CE 我爱测

Postfix has the command postconf which prints the entire Postfix configuration including its default values (default can also be shown using the -d option). Samba has a similar command which prints the entire configuration file i…

问题原文

原帖链接 · Tom · CC BY-SA 3.0

Postfix has the command postconf which prints the entire Postfix configuration including its default values (default can also be shown using the -d option).

Samba has a similar command which prints the entire configuration file including its default values: testparm -v.

I'm however unable to find a similar command to print the entire configuration BIND file including its default values. I know I can look up the default values in the BIND9 Configuration Reference (Chapter 6 of the ARM) but this is tedious and the default are not easily spotted when skimming through the web page. Does this option exist for BIND?

已采纳解答

原帖链接 · Håkan Lindqvist · CC BY-SA 4.0

No, there is no tool/option that really does what you want.

named-checkconf -p prints the full user configuration but does not show the full effective configuration (including defaults).

You can find the default configuration for options in bin/named/config.c in the BIND codebase, BUT some configuration parameters are interdependent, where overriding one affects others as well (see eg allow-query and allow-recursion), so the effective configuration is not as simple as just overlaying the user configuration on top of the default config without additional logic.

I agree that it would sometimes be useful to have a tool that would print the full effective configuration as named would use it, but there just isn't any option for that currently.

The best readily available suggestion I can offer is searching for default in your browser before you start reading through the options in the manual to get every instance of this word highlighted, making it easier to spot the default values as you go along.

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Server Fault
适用范围
以原帖系统、软件版本与发布日期为准(2017-04-23)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 3.0 / CC BY-SA 4.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。