Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I'm trying to set an SSL connection with stunnel. Some kind of SSL proxy.

Final aim
Connect server1 (doesn't use SSL – only HTTP) to server3 (that uses only SSL, HTTPS only).

My plan is

  1. server1: change endpoint to server2 (set HTTP connection)
  2. server2: install and setup stunnel to connect to server3 by HTTPS


cert = /etc/stunnel/stunnel.pem
foreground = yes
chroot = /var/run/stunnel
setuid = stunnel
setgid = stunnel
pid = /stunnel.pid
debug = 7
accept = 7121
connect = server3:443
;connect = server3:443/somedata

Test 1

$openssl s_client -connect server3:443
New, TLSv1/SSLv3, Server public key is 2048 bit

Test 2

openssl s_client -connect server2:7121
New, TLSv1/SSLv3, Server public key is 2048 bit

Result (connecting from server1 to server3 through server2).

Service [my_route] accepted (FD=3) from
Service [my_route] started
Service [my_route] accepted connection from
SSL state (accept): before/accept initialization
SSL_accept: 1408F10B: error:1408F10B:SSL routines:SSL3_GET_RECORD:wrong version number
Connection reset: 0 byte(s) sent to SSL, 0 byte(s) sent to socket
Local socket (FD=3) closed
Service [my_route] finished (0 left)


  1. Why doesn't the IP match to server3? Why is it connectiong to
    Does it mean that I'm connecting to a wrong server? How can that happen?

  2. What does this error say? That remote server uses another version of SSL, doesn't it?

share|improve this question
What do you mean with "that uses only ssl, https only" –  nixda Dec 29 '12 at 13:33
I mean that it does not support http. It suppoorts only https. –  Ilya Dec 29 '12 at 14:25
Ah,of course, my fault. I interpreted it wrong on my first edit –  nixda Dec 29 '12 at 14:31

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.