No traffic on lxdbr0 if proxy_protocol=True on proxy devices

Hi there!
I followed the instructions to set up my reverse proxy in a lxd container:
Guide to reverse proxy setup
I enabled the devices like this:

lxc config device add proxy myport80 proxy listen=tcp:0.0.0.0:80 connect=tcp:127.0.0.1:80 proxy_protocol=true
lxc config device add proxy myport443 proxy listen=tcp:0.0.0.0:443 connect=tcp:127.0.0.1:443 proxy_protocol=true

Without the proxy_protocol flag the network flow (tcpdump) from
eno0 <–> lxdbr0 <–> proxy container <–> webservices_containers

works like a charm but: The real ips / remote ips are not handed over to the proxy and also not to the lxdbr0 from eno0, so there is only localhost or the container ip visible with tcpdump and subsequently in the headers.

With the protocol enabled i can see no flow between eno0 and lxdbr0 …

Any hints how to set this up proberly that the remote ips are handed over?

Hi!

That tutorial is from five years ago and since then this forum has switched to supporting Incus. It’s quite easy to migrate, Migrating from LXD - Incus documentation. Then, the commands are mostly the same. You replace lxc with incus.

Speaking on old tutorials, I should contact Linode to update the tutorial for Incus.

So best to migrate and try the same again?

Yes. Also, start a new thread if the issue persists.

Note that the way the PROXY protocol works, is that it adds extra bytes at the start of each connection, and in those bytes it has the information of the originator IP address. This means that you need to make sure that all relevant services are aware of the PROXY protocol. That is, Incus will be adding the extra bytes and then the nginx service in the proxy container will be processing/removing those extra bytes before handing over the connection to the destination container.

Thanks i give it a shot:
You mean this:

Like:

http {
    #...
    server {
        listen 80   proxy_protocol;
        listen 443  ssl proxy_protocol;
        #...
    }
}