[Dnsmasq-discuss] How to add AAAA record for host with dynamic prefix?

Simon Kelley simon at thekelleys.org.uk
Sat Mar 13 00:45:19 UTC 2021


On 01/03/2021 20:40, Fred F wrote:
> Hi,
> 
> On Sun, 28 Feb 2021 at 18:07, Simon Kelley <simon at thekelleys.org.uk> wrote:
>> It's actually rather easy to add an address field, such that
>>
>> interface-name=laptop.thekelleys.org.uk,[::2],eth0/6
>>
>> and eth0 having 1:2:3:4::1, as before, yields an
>> a AAAA record for address 1234::2. The combination of the prefix and the
>> address being controlled by the prefix-length of the address.
> 
> that sounds great. My guess is that this would also greatly help the
> OPNsense project, as they have been struggling with IPv6 firewall
> rules with dynamic prefixes for quite some time now. If people were
> able to use DNS names then these kind of problems would be solved. But
> I agree that the option naming ("interface-name") is not ideal.
> 
> Option-wise I think the "host-record" directive would also be
> suitable, but I guess there is more work to be done there for
> supporting the "constructor:ifname" statements like this:
> 
> host-record=laptop,laptop.thekelleys.org,192.168.1.1,::192.168.1.1,constructor:eth0
> 
> And yeah, it's a bit clumsy. So if extending the "interface-name"
> option is quick and easy this would be fine I guess, as this is not a
> feature which is required by the majority of users (yet). But it would
> definitely be a unique feature of dnsmasq.
> 
> 
> Best regards,
> Frederik
> 


I've pushed a commit to the git repo which implements dynamic-host

dynamic-host=example.com,0.0.0.56,::1234,eth0

netmask arithmetic in IPv6 addresses is hard!

Results of testing greatly appreciated.


Cheers,

Simon.





More information about the Dnsmasq-discuss mailing list