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

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


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 :       localhost
::1             localhost6         listenall4
::              listenall6

In my stunnel.conf:

accept = listenall4:443
connect =
TIMEOUTclose = 0

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?


More information about the stunnel-users mailing list