Skip to content

IPv6 and PROXY protocol not working #515

@meiser79

Description

@meiser79

I have a dual-stack server running sslh 2.3.0 with PROXY protocol support.

My sslh.conf looks like this:

inetd: false;
numeric: true;
timeout: 2;
user: "nobody";
pidfile: "/var/run/sslh.pid";
listen:
(
{ host: "::"; port: "443"; },
{ host: "0.0.0.0"; port: "443"; }
);
protocols:
(
{ name: "ssh"; service: "ssh"; host: "192.168.1.1"; port: "22"; },
{ name: "tls"; host: "192.168.1.2"; port: "443"; sni_hostnames: [ "example.com" ]; proxyprotocol: 2; log_level: 1; }
);
on-timeout: "ssh";

On 192.168.1.2, there's an apache2 v2.4.66 running on Alpine Linux 3.22.2.

This configuration works with IPv4, but with IPv6, there's an issue.
When I run curl -6 https://example.com on my VPS (not in the same network) and I see:

* Host example.com:443 was resolved.
* IPv6: 2a01:xxxx
* IPv4: (none)
*   Trying [2a01:xxx]:443...
* Connected to example.com (2a01:xxx) port 443
* ALPN: curl offers h2,http/1.1
* TLSv1.3 (OUT), TLS handshake, Client hello (1):
*  CAfile: /etc/ssl/certs/ca-certificates.crt
*  CApath: /etc/ssl/certs
* OpenSSL SSL_connect: SSL_ERROR_SYSCALL in connection to example.com:443 
* Closing connection
curl: (35) OpenSSL SSL_connect: SSL_ERROR_SYSCALL in connection to example.com:443 

The sslh log does not show the typical
Tue Dec 23 12:17:56 2025 auth.info sslh[4520]: tls:connection from 2a01:xxx:47108 to 2a01:xxx:443 forwarded from 192.168.1.1:50054 to 192.168.1.2:443
and there're no packets received on apache2 side on port 443.

There's only a connect: Bad file descriptor on the console while running in foreground.

Could you please have a look? Thanks a lot in advance!

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