Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm trying to set up a stunnel for WebDav on Windows. I want to connect 80 port on my local interface to 443 on another machine in my network. I can ping the machine remote machine. However when I use the tunnel, I'm getting this error all the time

SSL state (accept): before/accept initialization
SSL_accept: 140760FC: error:140760FC:SSL routines:SSL23_GET_CLIENT_HELLO:unknown protocol

There is nothing in the logs on the other machine and here's my stunnel connection config

accept  =
connect =
verify = 0

I've set it up to accept all certificates so this shouldn't be a problem with a self-signed certificate remote host uses.

Does anyone knows what might be the problem that this connection cannot be eastablished?

share|improve this question
Are you using stunnel, which is a piece of software, or are you trying to create a secure tunnel? Your question appears to have the terms confused. – John Gardeniers Apr 17 '10 at 21:37
I'm using stunnel the app. – RaYell Apr 20 '10 at 10:35
up vote 2 down vote accepted

I've found the solution for this problem. I've been using SSL in server mode when I actually needed client mode.

share|improve this answer
Care to share the solution with us? Would be most appreciated thanks. – user2800708 Feb 18 at 12:25

I guess you are accessing your local host with http, but looks like your remote host is already https. stunnel is meant for reverse cases, when local services do not support SSL.

Why can't you just go directly with https/webdav on the remote machine and bypass stunnel completely?

share|improve this answer
I'm doing a proof of concept. This SLL tunnel is a part of a larger app and I'm going to implement it on my own because I need several modifications. I just want to test how stable this kind of solution is. – RaYell Apr 20 '10 at 10:33

Your Answer


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

Not the answer you're looking for? Browse other questions tagged or ask your own question.