Skip to content

proxy_protocol not working with Amazon ELB #1533

Open
@MorenoGentili

Description

@MorenoGentili

Hello everyone, proxy_protocol is not working with Amazon ELB (Network load balancer) for some reason. "Proxy Protocol V2" is enabled for the Target Group on Amazon.
I'm using Alpine Linux, everything latest version.

I tried with this configuration:

rtmp {
    server {
        listen 1935 proxy_protocol;
        chunk_size 4096;

        application streaming {
            #...
        }
    }
}

But then, when I start to stream via RTMP using FFmpeg, I get this error.

Cannot read RTMP handshake response.

image

Same thing with OBS, I also get an error.

I've found a workaround with nginx-mod-stream. Here it is:

stream {
    server {
        listen 1935 proxy_protocol;
        proxy_pass 127.0.0.1:1936;
        proxy_protocol on;
        set_real_ip_from 0.0.0.0/0;
    }
}

rtmp {
    server {
        listen 127.0.0.1:1936 proxy_protocol;
        chunk_size 4096;

        application streaming {
            #...
        }
    }
}

I can start streaming this way, and I get the correct Client IP address.

What could possibly be the cause?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions