Cottand / leng

:zap: fast dns server, built to block advertisements and malware servers
https://cottand.github.io/leng/
MIT License
57 stars 69 forks source link

Wildcard DNS records not working #53

Open negatethis opened 5 months ago

negatethis commented 5 months ago

I've setup leng on NixOS through the provided flake.nix with customdnsrecords = [ "*.nixos.container. IN A 192.168.0.76" ]; thinking it would provide the appropriate DNS mappings. However, leng interprets the wildcard literally, so only *.nixos.container gets mapped to 192.168.0.76, not nixos.container and any subdomains.

Cottand commented 5 months ago

Thank you for your report! What you expect is indeed zonefille syntax as per RFC5492. The lib I use (https://github.com/miekg/dns) claims to be compliant to this RFC so might be a bug on my end. I will investigate and hopefully fix it over the next few days

Cottand commented 5 months ago

I filed an issue upstream https://github.com/miekg/dns/issues/1534

Cottand commented 5 months ago

In the meantime, if you set customdnsrecords = [ "nixos.container. IN A 192.168.0.76" ];

that should get you what you want (but you are still correct that what you posted should work)

Cottand commented 4 months ago

An update: I have submitted a PR https://github.com/miekg/dns/pull/1536 upstream (which should fix your case)

negatethis commented 4 months ago

Perfect, thank you for looking into it so quickly! I'll keep an eye out for when that PR gets merged upstreamed and used in leng.