I am running on my personal machine with Ubuntu 18.04 multiple lxc containers. Each container has Ubuntu 18.04 as well. For each container I am running an application which offers a UI on https://localhost:3000/. Since every container has a local IP address then I should be able to call forth the application UI on my host machine using https://<local vm ip>:3000/ .
This doesn’t work. If I run Apache2 inside the containers, I can see the default page for http://<local vm ip> but nothing on the other application running on port 3000. I can confirm the app on port 3000 is working.
I enabled ufw in the host and container, and whitelisted/allowed several ports including 3000. Connection is still refused via many ports that I have opened.
user@pc:~$ nc -zv 10.155.120.175 22
Connection to 10.155.120.175 22 port [tcp/ssh] succeeded!
user@pc:~$ nc -zv 10.155.120.175 3000
nc: connect to 10.155.120.175 port 3000 (tcp) failed: Connection refused
I also noticed that the application logs inside the VM contained this line, but I dont know what it means in the context of app health.
Nov 17 20:38:49 server systemd[1]: app.service: Failed to reset devices.list: Operation not permitted
How can I enable ip:port access between host and lxc vm (and between lxc vms)? I want my lxc instances to be able to communicate with each other and my main host, exchange data etc.