I'm trying to set an SSL connection with stunnel. Some kind of SSL proxy.
Connect server1 (doesn't use SSL – only HTTP) to server3 (that uses only SSL, HTTPS only).
My plan is
- server1: change endpoint to server2 (set HTTP connection)
- 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 [my_route] accept = 7121 connect = server3:443 ;connect = server3:443/somedata
$openssl s_client -connect server3:443 New, TLSv1/SSLv3, Server public key is 2048 bit
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 10.0.2.2:12345 Service [my_route] started Service [my_route] accepted connection from 10.0.2.2:12345 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)
Why doesn't the IP match to server3? Why is it connectiong to 10.0.2.2?
Does it mean that I'm connecting to a wrong server? How can that happen?
What does this error say? That remote server uses another version of SSL, doesn't it?