[英]Multiple addn-hosts conf in DNSMasq
Is it possible to add multiple files to the "addn-hosts" node in dnsmasq.conf?是否可以将多个文件添加到 dnsmasq.conf 中的“addn-hosts”节点?
Currently I have a single file "dnsmasq.multihosts" which has a list of servers for DNSmasq to resolve.目前我有一个文件“dnsmasq.multihosts”,它有一个 DNSmasq 解析的服务器列表。 My problem is that dnsmasq.multihosts is too long now and I would like to separate it into multiple Files like "dnsmasq.database", "dnsmasq.webserver" etc for easy maintenance.我的问题是 dnsmasq.multihosts 现在太长了,我想将它分成多个文件,如“dnsmasq.database”、“dnsmasq.webserver”等,以便于维护。
Yes, it is possible to specify multiple files for --addn-hosts
in dnsmasq.conf
.是的,可以在dnsmasq.conf
为--addn-hosts
指定多个文件。 This option may be repeated for more than one additional hosts file.可以对多个附加主机文件重复此选项。 If a directory is given, all the files in that directory will be read.如果给定目录,则将读取该目录中的所有文件。
dnsmasq --help
...
-H, --addn-hosts=<file> Additional hosts file. Read the specified file as well as
/etc/hosts. If -h is given, read only the specified file.
This option may be repeated for more than one additional
hosts file. If a directory is given, then read all the files
contained in that directory.
The dnsmasq
manual page is at http://www.thekelleys.org.uk/dnsmasq/docs/dnsmasq-man.html . dnsmasq
手册页位于http://www.thekelleys.org.uk/dnsmasq/docs/dnsmasq-man.html 。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.