<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
</head>
<body>
<div dir="ltr">
<div></div>
<div>
<div>
<div dir="ltr"><span id="ms-outlook-ios-cursor"></span><br>
</div>
</div>
<div id="ms-outlook-mobile-signature">
<div><br>
</div>
<div style="direction:ltr" dir="auto">Sent from my iPhone. Please excuse typos and autocorrection errors. </div>
<div style="direction:ltr" dir="ltr"><br>
</div>
</div>
<div id="mail-editor-reference-message-container" class="ms-outlook-mobile-reference-message">
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif"><b>From:</b> Dnsmasq-discuss <dnsmasq-discuss-bounces@lists.thekelleys.org.uk> on behalf of Gary R. Schmidt <grschmidt@acm.org><br>
<b>Sent:</b> Monday, May 8, 2023 11:47 AM<br>
<b>To:</b> dnsmasq-discuss@lists.thekelleys.org.uk <dnsmasq-discuss@lists.thekelleys.org.uk><br>
<b>Subject:</b> Re: [Dnsmasq-discuss] Need help on configuring dnsmasq
<div> </div>
</font></div>
<meta name="Generator" content="Microsoft Exchange Server">
<!-- converted from text --><font size="2"><span style="font-size:11pt;">
<div class="PlainText">On 09/05/2023 00:10, Buck Horn wrote:<br>
> On 08.05.2023 15:00:22, "public1020" wrote:<br>
> <br>
>> Thanks, dnsmasq does not support this feature. <br>
> <br>
> Why would you think so when you have been pointed to the correct answer <br>
> from the docs?<br>
> <br>
> Matus UHLAR even quoted the decisive sentence for you:<br>
> <br>
> <br>
>>> it does and the answer is listed in dnsmasq manual page, just where you<br>
>>> would search for it:<br>
>>> -A, --address=/<domain>[/<domain>...]/[<ipaddr>]<br>
>>> ... Note that /etc/hosts and DHCP leases override this for individual <br>
>>> name<br>
> <br>
> <br>
> 'address' would specify an IP address to return for any host in the <br>
> given domains, i.e. including subdomains, so its not fit to satisfy your <br>
> original request about an individual host name, e.g. for shadowing only <br>
> example.com, but none of its subdomains.<br>
> <br>
> As the docs quoted by Matus UHLAR**state, you may use entries in <br>
> /etc/hosts to that purpose:<br>
> Just add some lines with the desired IP and hostname associations to <br>
> that file.<br>
> <br>
> Of course, that may only work if you wouldn't prevent dnsmasq from <br>
> reading /etc/hosts.<br>
> So if your dnsmasq configuration would use the 'no-hosts' option (or if <br>
> you'd just like to keep things separated), you could configure <br>
> 'addn-hosts' to point dnsmasq to a separate file with your custom host <br>
> definitions.<br>
> <br>
I will re-state all of this, to see if I have it right:<br>
<br>
The OP wants example.com to return 1.2.3.4, but *.example.com to go up <br>
the DNS tree and return the actual IP address.<br>
<br>
Using -A/--address doesn't do this, it replies with 1.2.3.4 for <br>
*.example.com as well as example.com, as documented (and presumably as <br>
intended).<br>
<br>
Setting example.com to be 1.2.3.4 in /etc/hosts or similar, and not <br>
fiddling around with -A/--address should give the OP the required behaviour.<br>
<br>
Is that an accurate summation?<br>
<br>
        Cheers,<br>
                Gary    B-)</div>
<div class="PlainText" dir="ltr"><br>
</div>
<div class="PlainText">Might try host-record=example.com,1.2.3.4</div>
<div class="PlainText"><br>
<br>
<br>
<br>
_______________________________________________<br>
Dnsmasq-discuss mailing list<br>
Dnsmasq-discuss@lists.thekelleys.org.uk<br>
<a href="https://lists.thekelleys.org.uk/cgi-bin/mailman/listinfo/dnsmasq-discuss">https://lists.thekelleys.org.uk/cgi-bin/mailman/listinfo/dnsmasq-discuss</a><br>
</div>
</span></font></div>
</div>
</div>
</body>
</html>