LXD proxy device: listen to a specific interface

I’m actually using proxy devices like this:

lxc config device add mycontainer http proxy listen=tcp: connect=tcp:

Then I have a HAProxy using the port 8080 of the LXD machine.
But my HAProxy is contacting the machine on a private network, so there is no need to bind to tcp: which listen on the public network too.
I want to use something like tcp:

I do not want to specify an IP address as I’m running in a cluster mode. HAProxy is configured to use three backend (i.e,, and chose the one available.
So if I’m moving the container to another LXD machine, nothing has to be done on HAProxy config.

Is it possible somehow?


I’m not sure this is possible at the moment. You could create a github issue as an idea.

Alternatively you could add a firewall to your LXD hosts so that the proxy service is not accessible externally.

1 Like