Skip to main content
6 of 10
added 91 characters in body

I was not able to reach the Internet from the container neither to reach the services running inside the container by following the above instructions. The problem seemed to be somehow related to the 169.254.x.x address range. Finally, this helped me setup the static IPs for the container interface (with private networking) and the host:

Assign static IP address to systemd-nspawn container (private networking mode).

Note: if you are running dnsmasq on the host, you may experience a conflict with the DHCP service provided by the systemd-networkd service. Since the IPs are static, you can deactivate DHCP assignment by DHCPServer=no setting to prevent this collision.