Is it possible to add multiple files to the "addn-hosts" node in dnsmasq.conf?
Currently I have a single file "dnsmasq.multihosts" which has a list of servers for DNSmasq to resolve. 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.
Yes, it is possible to specify multiple files for --addn-hosts in dnsmasq.conf. 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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With