LXD, dnsmasq, IPv6 reverse lookups

My residential ISP doesn’t offer reverse lookups for their IPv6 blocks that they delegate out with the PD flag to consumer routers. This causes some annoying slow-downs when talking to the various services I’m running in LXD containers, since a lot of them do reverse DNS lookups.

Under the hood, LXD relies on dnsmasq to provide resolution services to the containers, for all the IP addresses that are given to the containers. dnsmasq has an option called synth-domain, which makes it possible to synthesize valid reverse DNS names in a specified domain, for a specified range of addresses.

So, a simple configuration of synth-domain=example.com,2001:bb6:nnnn:yyyy::1/64,ip- fed to dnsmasq via | lxc network set lxdbr0 raw.dnsmasq - and the LXD containers are able to do instantaneous reverse resolution. Doesn’t affect the rest of the internet, which is just fine by me.


Posted

in

Tags: