[systemd-devel] sibling DNS lookup of nspawn containers

Johannes Ernst johannes.ernst at gmail.com
Fri Jun 18 21:52:25 UTC 2021


> On Jun 18, 2021, at 2:02, Silvio Knizek <killermoehre at gmx.net> wrote:
> 
> Am Donnerstag, dem 17.06.2021 um 20:26 -0700 schrieb Johannes Ernst:
>> I’d like to be able to DNS lookup container b from within container a, if both were started with systemd-nspawn as siblings of each other, and shown as a and b in machinectl list.
>> 
>> man nss-mymachines specifically notes it won’t do that.
>> 
>> What’s the proper way of doing this?
>> 
>> Thanks,
> Hi Johannes,
> 
> you would enable LinkLocalMulticastNameResolution (LLMNR) in the
> containers systemd-networkd.
> See man:networkd.conf for further information.


Thanks, Silvio, but no luck:

I have host, container a and container b.

In both containers, .network for host0 has LLMNR=yes in the [Network] section

The host has LLMNR=yes in the [Resolve] section of /etc/systemd/resolved.conf

On the host: “resolvectl query a” and “…b” works.

In the containers “resolvectl query a” works only in container a, not in b, and vice versa. So no sibling lookup.

iptables and ip6tables show default rules for all three.

What am I missing?

Thanks,



Johannes.



More information about the systemd-devel mailing list