[stunnel-users] stunnel : binding in ipv6+ipv4 : problem

Guylhem Aznar stunnel at guylhem.net
Sat Aug 27 04:37:14 CEST 2011


Hello

I have a problem with stunnel : I just don't know how to specify 2
different port forwarding, one for all ipv4 connections to port 443,
the other for all ipv6 connections. Either one seem to work, but I
can't have both at the same time.

In my /etc/hosts :
127.0.0.1       localhost
::1             localhost6
0.0.0.0         listenall4
::              listenall6

In my stunnel.conf:

[sslh]
accept = listenall4:443
connect = 127.0.0.1:444
TIMEOUTclose = 0

[ssl6]
accept = listenall6:443
connect = 6.guylhem.org:80
TIMEOUTclose = 0

I have read that linux can block ipv6 sockets if the ipv4 socket is
created first, but here the order doesn't change anything.

I though that stunnel was ipv6 capable, but apparently it doesn't play
well with ipv4 on the same port. So I tried to remove one of the
listenall :  the listenall4 is important, but listenall6 is not. Yet
giving a AAAA only host like 6.guylhem.org does not help - even if it
goes before the listenall4. So I'm stuck.

Has anyone patched stunnel for such a situation?

Guylhem



More information about the stunnel-users mailing list