On 28 Jun 2024, at 00:02, Buck Horn via Dnsmasq-discuss 
<dnsmasq-discuss@lists.thekelleys.org.uk> wrote:
> 
> On 27.06.24 22:13, Dimitry Andric wrote:
>> In particular, this happens when dnsmasq serves a --local domain, and
>> 'fixed' hosts are defined with --address entries having _only_ an IPv4
>> address.
>> 
>> For example, if dnsmasq.conf contains:
>> 
>>   no-daemon
>>   log-queries
>> 
>>   domain=example.com
>>   interface=eth0
>>   server=1.1.1.1
>>   local=/example.com/
>> 
>>   address=/foo.example.com/10.1.2.3
>>   address=/bar.example.com/10.1.2.3
> 
> 
> Your address literals are more specific than your 'local=' declarations.
> 
> Did you try to actually '...match the specified address literal...' yet?
> 
>  local=/foo.example.com/
>  local=/bar.example.com/
> 
>  address=/foo.example.com/10.1.2.3
>  address=/bar.example.com/10.1.2.3

Sure, that also appears to work. I just don't know what the preferred
syntax is for declaring hosts that have fixed IP addresses, as opposed
to hosts that get addresses dynamically via DHCP.

I.e. the original dnsmasq config file was written by someone who was
convinced that the way to serve up an internal company domain (which
uses DHCP for most hosts, fixed addresses for some other hosts) was
something like:

  dhcp-host=foo,10.1.2.3
  dhcp-host=bar,10.1.2.4
  dhcp-host=baz,10.1.2.5
  dhcp-option=eth0,3,10.1.2.1
  dhcp-range=eth0,10.1.2.50,10.1.2.254,255.255.255.0
  domain=internal.example.com
  interface=eth0
  local=/internal.example.com/
  server=1.1.1.1
  address=/foo.internal.example.com/10.1.2.3
  address=/bar.internal.example.com/10.1.2.4
  address=/baz.internal.example.com/10.1.2.5

That used to work fine with dnsmasq 2.80, but with 2.90 it started
returning NXDOMAINs.

-Dimitry


_______________________________________________
Dnsmasq-discuss mailing list
Dnsmasq-discuss@lists.thekelleys.org.uk
https://lists.thekelleys.org.uk/cgi-bin/mailman/listinfo/dnsmasq-discuss

Reply via email to