[systemd-devel] Networking in a systemd-nspawn container
Tobias Hunger
tobias.hunger at gmail.com
Fri Oct 22 17:54:41 UTC 2021
Hello Systemd Mailing List!
I have a laptop and run a couple of systemd-nspawn containers on that
machine. This works great, except that name resolution insode the
containers fails whenever the network on the outside changes.
This is not too surprising: At setup time the resolver information is
copied into the containers and never updated. That is sup-optimal for
my laptop that I keep moving between networks.
I have been wondering: Would it be possible to forward the containers
resolver to the host machine resolver somehow?
Could e.g. systemd-nspawn optionally make the hosts resolver available
in the containers network namespace? Maybe by setting up some port
forwarding or by putting a socket into the container somewhere?
Any ideas? I can do some of the work with a bit of guidance.
Best Regards,
Tobias
More information about the systemd-devel
mailing list