태그 보관물: stunnel

stunnel

Stunnel 서버 설정 버그 :`SSL3_GET_CLIENT_HELLO : 잘못된 버전 번호` 초 동안

stunnelWindows XP에서 서버를 설정하고 있는데 클라이언트가 액세스하려고하면이 버그가 발생합니다.

2013.02.14 00:02:16 LOG7[8848:7664]: Service [https] accepted (FD=320) from 107.20.36.147:56160
2013.02.14 00:02:16 LOG7[8848:7664]: Creating a new thread
2013.02.14 00:02:16 LOG7[8848:7664]: New thread created
2013.02.14 00:02:16 LOG7[8848:9792]: Service [https] started
2013.02.14 00:02:16 LOG5[8848:9792]: Service [https] accepted connection from 107.20.36.147:56160
2013.02.14 00:02:16 LOG7[8848:9792]: SSL state (accept): before/accept initialization
2013.02.14 00:02:16 LOG7[8848:9792]: SSL alert (write): fatal: handshake failure
2013.02.14 00:02:16 LOG3[8848:9792]: SSL_accept: 1408A10B: error:1408A10B:SSL routines:SSL3_GET_CLIENT_HELLO:wrong version number
2013.02.14 00:02:16 LOG5[8848:9792]: Connection reset: 0 byte(s) sent to SSL, 0 byte(s) sent to socket
2013.02.14 00:02:16 LOG7[8848:9792]: Local socket (FD=320) closed
2013.02.14 00:02:16 LOG7[8848:9792]: Service [https] finished (0 left)

이것에 대해 어떻게 생각하십니까? 온라인에서 이것이 서버가 SSL3에서 통신 할 수 있다고 광고하고 있음을 의미하지만 실제로는 그렇지 않다는 것을 읽었습니다. 이것이 사실이라면 어떻게 해결할 수 있는지 알고 싶습니다. stunnel.conf파일을 편집하고 있지만이 문제를 해결하기 위해 무엇을 변경 해야할지 모르겠습니다.

최신 정보:

위의 오류 메시지는 Twilio 클라이언트 (예 : Twilio 서버)가 내 서버에 액세스하려고 할 때만 표시됩니다. 컴퓨터 중 하나를 사용하여 서버에 액세스하려고하면 페이지가 표시되지만 내용이 표시된 후 Chrome은 약 30 초 동안 페이지를 ‘로드 중’으로 stunnel표시하고이 메시지가 표시됩니다.

transfer: s_poll_wait: TIMEOUTclose exceeded: closing

최신 정보:

wireshark 캡처는 다음과 같습니다. https://gist.github.com/cool-RR/4963477

캡 파일 : https://dl.dropbox.com/u/1927707/wireshark.cap

서버는 포트 8088에서 실행됩니다.

최신 정보:

다음은 서버의 로그입니다 (debug = 7 사용).

2013.02.17 17:06:52 LOG7[7636:2092]: No limit detected for the number of clients
2013.02.17 17:06:52 LOG5[7636:2092]: stunnel 4.54 on x86-pc-msvc-1500 platform
2013.02.17 17:06:52 LOG5[7636:2092]: Compiled/running with OpenSSL 1.0.1c-fips 10 May 2012
2013.02.17 17:06:52 LOG5[7636:2092]: Threading:WIN32 SSL:+ENGINE+OCSP+FIPS Auth:none Sockets:SELECT+IPv6
2013.02.17 17:06:52 LOG5[7636:2092]: Reading configuration from file stunnel.conf
2013.02.17 17:06:52 LOG5[7636:2092]: FIPS mode is enabled
2013.02.17 17:06:52 LOG7[7636:2092]: Compression not enabled
2013.02.17 17:06:52 LOG7[7636:2092]: Snagged 64 random bytes from C:\Documents and Settings\User/.rnd
2013.02.17 17:06:52 LOG7[7636:2092]: Wrote 1024 new random bytes to C:\Documents and Settings\User/.rnd
2013.02.17 17:06:52 LOG7[7636:2092]: PRNG seeded successfully
2013.02.17 17:06:52 LOG6[7636:2092]: Initializing service [https]
2013.02.17 17:06:52 LOG7[7636:2092]: Certificate: G:\Dropbox\StartSSL\SSL Cert.pem
2013.02.17 17:06:52 LOG7[7636:2092]: Certificate loaded
2013.02.17 17:06:52 LOG7[7636:2092]: Key file: G:\Dropbox\StartSSL\SSL Cert.pem
2013.02.17 17:06:52 LOG7[7636:2092]: Private key loaded
2013.02.17 17:06:52 LOG7[7636:2092]: Could not load DH parameters from G:\Dropbox\StartSSL\SSL Cert.pem
2013.02.17 17:06:52 LOG7[7636:2092]: Using hardcoded DH parameters
2013.02.17 17:06:52 LOG7[7636:2092]: DH initialized with 2048-bit key
2013.02.17 17:06:52 LOG7[7636:2092]: ECDH initialized with curve prime256v1
2013.02.17 17:06:52 LOG7[7636:2092]: SSL options set: 0x03000004
2013.02.17 17:06:52 LOG5[7636:2092]: Configuration successful
2013.02.17 17:06:52 LOG7[7636:2092]: Service [https] (FD=268) bound to 0.0.0.0:8088
2013.02.17 17:07:08 LOG7[7636:2092]: Service [https] accepted (FD=320) from 54.242.25.199:45922
2013.02.17 17:07:08 LOG7[7636:2092]: Creating a new thread
2013.02.17 17:07:08 LOG7[7636:2092]: New thread created
2013.02.17 17:07:08 LOG7[7636:8004]: Service [https] started
2013.02.17 17:07:08 LOG5[7636:8004]: Service [https] accepted connection from 54.242.25.199:45922
2013.02.17 17:07:08 LOG7[7636:8004]: SSL state (accept): before/accept initialization
2013.02.17 17:07:08 LOG7[7636:8004]: SSL alert (write): fatal: handshake failure
2013.02.17 17:07:08 LOG3[7636:8004]: SSL_accept: 1408A10B: error:1408A10B:SSL routines:SSL3_GET_CLIENT_HELLO:wrong version number
2013.02.17 17:07:08 LOG5[7636:8004]: Connection reset: 0 byte(s) sent to SSL, 0 byte(s) sent to socket
2013.02.17 17:07:08 LOG7[7636:8004]: Local socket (FD=320) closed
2013.02.17 17:07:08 LOG7[7636:8004]: Service [https] finished (0 left)

최신 정보:

여기 내 stunnel.conf파일이 있습니다.



답변

네트워크 캡처를 만들고 거부 된 이유를 확인해야합니다. 또한 양쪽 끝점의 로그를 확인하십시오. debugstunnel conf 의 레벨을 높이십시오.

클라이언트가 지원하는 SSL 프로토콜의 버전을 파악하려면 네트워크 추적을 작성해야합니다. 그런 다음 서버가 해당 버전도 지원하는지 확인하십시오.

클라이언트는 지원하는 최고 TLS 프로토콜 버전, 난수, 제안 된 CipherSuites 목록 및 제안 된 압축 방법을 지정하는 ClientHello 메시지를 보냅니다.

출처

재협상시 보안 버그로 인해 몇 년 전에 SSL 프로토콜이 변경되었습니다. 참조 CVE-2009-3555이 페이지에 SSL 재협상에

서버가 다음과 같이 응답하고 있습니다.

Secure Sockets Layer
    SSLv3 Record Layer: Alert (Level: Fatal, Description: Handshake Failure)
        Content Type: Alert (21)
        Version: SSL 3.0 (0x0300)
        Length: 2
        Alert Message
            Level: Fatal (2)
            Description: Handshake Failure (40)

SSL 서버에서 로그를 확인하여 연결이 거부 된 이유를 확인해야합니다. 다음을 사용하여 stunnel에서 SSL 디버깅을 활성화하십시오 debug=7.

stunnel서버는 가지고 options = NO_SSLv3있지만, 클라이언트는 SSLv3에를 사용하여 연결을 시도하고 있습니다. 최신 버전의 SSL을 지원하도록 클라이언트를 업그레이드하거나 stunnelSSLv3을 승인하도록 구성을 변경해야합니다 .


답변

클라이언트와 서버간에 SSL 버전이 일치하지 않을 수 있습니다. 클라이언트에서 이전 SSL 버전을 비활성화하여 클라이언트가 SSL3 전용으로 구성되어 있는지 확인하십시오.


답변