TL;DR: How to expose network services to the host through machinectl/nspawn containers?
I'm trying to make things perfectfor my setup, i.e. installing my services in separated chroot instances.
To start them, I want to comply with SystemD management with
# debootstrap stretch /var/lib/machines/mymachine
# machinectl start mymachine # works well!
# machinectl shell root@mymachine bash
Then I install dummy
apache2 on it:
(jail)# apt install -y apache2 && systemctl enable apache2 && systemctl start apache2
(jail)# ss -tnlp | grep 80 # yields apache2 running.
However, the 80 port (or even any port whatsoever, say 8080) is not visible on listening on the host. How to make it work ?
Thank you team,