[Dnsmasq-discuss] Second question

Ken Gillett kengroups at icloud.com
Thu Mar 18 19:10:12 UTC 2021


Well I got dnsmasq running (more on that later) to do some tests and can confirm that it DOES read all the hostnames on each line of a hosts file. BUT, it seems to create each of them as an A record, rather than as CNAMES all pointing to the first name on that line. Although this works, it’s not quite what the hosts file is supposed to represent as after the first name, the others are supposed to be aliases, which surely are better represented by CNAME records?

However I initially had a problem running it from the command line as it simply spat out:-

	dnsmasq: dhcp-hostsdir, dhcp-optsdir and hostsdir are not supported on this platform

and quit. In fact only hostsdir was actually included in the conf file, but I’m guessing the error is generated if any of those options are used (and I would like to use all of them). Now I need to figure why. Are these options that can be excluded at compile time?

I’m running this in MacOS and installed dnsmasq from HomeBrew as it was easier than compiling it myself, but I’m thinking they have compiled it without those options. In which case I’ll compile my own version, but does seem a rather unnecessarily restrictive thing to do.

Is this the likely cause or is there another reason for it to complain in this way, like these options really are not available in MacOS for some strange reason? The latter seems rather unlikely to me, but would appreciate clarification.

Thanks.


Ken  G i l l e t t

_/_/_/_/_/_/_/_/



> On 18 Mar 2021, at 15:53, Ken Gillett <kengroups at icloud.com <mailto:kengroups at icloud.com>> wrote:
> 
> Sorry to ‘bump' this. I presume the lack of response is that there is currently no way to define CNAMEs that will be re-read on SIGHUP. Could I suggest to Simon that it would be really advantageous to have --cname-file and --cname-dir options to allow all CNAMEs to be defined in one or more external files that would be treated in the same way as dhcp-hostfile and dhcp-hostdir (and opts) as it seems to me that the CNAMEs are as likely to change and require a re-read as the host names themselves. Possibly even more likely.
> 
> On the subject of hostname aliases, could someone please confirm whether or not dnsmasq takes notice of alias names defined in a hosts file in which each line defines an address, its hostname and then multiple aliases if desired. Does dnsmasq add these alias names as CNAMEs or simply ignore them? I have searched but can find no reference to how dnsmasq behaves with such hosts file definitions.
> 
> Thanks.
> 
> 
> Ken  G i l l e t t
> 
> _/_/_/_/_/_/_/_/
> 
> 
> 
>> On 16 Mar 2021, at 20:14, Ken Gillett via Dnsmasq-discuss <dnsmasq-discuss at lists.thekelleys.org.uk <mailto:dnsmasq-discuss at lists.thekelleys.org.uk>> wrote:
>> 
>> Further to this question, how can CNAME records be defined that can be re-read on SIGHUP?
>> 
>> As far as I can tell, they can only be specified on the command line, or in a conf file (which is only read on startup).
>> 
>> Is there any way to define CNAMEs in a way that changes can be applied without a full restart of dnsmasq.
>> 
>> 
>> Ken  G i l l e t t
>> 
>> _/_/_/_/_/_/_/_/
>> 
>> 
>> 
>>> On 16 Mar 2021, at 16:16, Ken Gillett via Dnsmasq-discuss <dnsmasq-discuss at lists.thekelleys.org.uk <mailto:dnsmasq-discuss at lists.thekelleys.org.uk>> wrote:
>>> 
>>> I think I’ve figured this out.
>>> 
>>> SIGHUP causes dnsmasq to re-read the ‘opts’ files, but it does NOT re-read any ‘conf’ files.
>>> 
>>> So a significant and possibly very useful difference.
>>> 
>>> Any other differences anyone knows?
>>> 
>>> 
>>> Ken  G i l l e t t
>>> 
>>> _/_/_/_/_/_/_/_/
>>> 
>>> 
>>> 
>>>> On 16 Mar 2021, at 15:39, Ken Gillett via Dnsmasq-discuss <dnsmasq-discuss at lists.thekelleys.org.uk <mailto:dnsmasq-discuss at lists.thekelleys.org.uk>> wrote:
>>>> 
>>>> --dhcp-optsfile/dir and/or --conf-file/dir point to external files/dirs. My question then is:-
>>>> 
>>>> What’s the difference between these ‘opts’ and ‘conf’ files?
>>>> 
>>>> As far as I understand, they would both contain dnsmasq configuration options (without the --) so is there a difference, or are they both just different ways of specifying external configuration files of options?
>>> 
>>> _______________________________________________
>>> Dnsmasq-discuss mailing list
>>> Dnsmasq-discuss at lists.thekelleys.org.uk <mailto:Dnsmasq-discuss at lists.thekelleys.org.uk>
>>> https://lists.thekelleys.org.uk/cgi-bin/mailman/listinfo/dnsmasq-discuss <https://lists.thekelleys.org.uk/cgi-bin/mailman/listinfo/dnsmasq-discuss>
>> 
>> _______________________________________________
>> Dnsmasq-discuss mailing list
>> Dnsmasq-discuss at lists.thekelleys.org.uk <mailto:Dnsmasq-discuss at lists.thekelleys.org.uk>
>> https://lists.thekelleys.org.uk/cgi-bin/mailman/listinfo/dnsmasq-discuss <https://lists.thekelleys.org.uk/cgi-bin/mailman/listinfo/dnsmasq-discuss>
> 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.thekelleys.org.uk/pipermail/dnsmasq-discuss/attachments/20210318/e009ad9b/attachment-0001.htm>


More information about the Dnsmasq-discuss mailing list