LoginSignup
1
0

More than 1 year has passed since last update.

NLB-EC2構成を取ったときにTCP443にてCONNECT_CR_SRVR_HELLO:wrong version number

Posted at

概要

AWSでクライアント証明書を使うために、NLB-EC2構成を取ったときに、Curlで叩くとよくわからないエラーCONNECT_CR_SRVR_HELLO:wrong version numberが発生

結論としてはTargetGroupのProxy2をONにしていたためチェックを外して解決した。

現状

NLBはTCP80,443をそれぞれTargetGroupでそのままEC2に流している。

% curl -v --key private.pem --cert cert.crt -k "https://example.jp"
*   Trying xxx...
* TCP_NODELAY set
* Connected to example.jp (xxx) port 443 (#0)
* ALPN, offering h2
* ALPN, offering http/1.1
* successfully set certificate verify locations:
*   CAfile: /etc/ssl/cert.pem
  CApath: none
* TLSv1.2 (OUT), TLS handshake, Client hello (1):
* error:1400410B:SSL routines:CONNECT_CR_SRVR_HELLO:wrong version number
* Closing connection 0
curl: (35) error:1400410B:SSL routines:CONNECT_CR_SRVR_HELLO:wrong version number

proxy関係で同様のエラーが発生する模様

TargetGroup修正

スクリーンショット 2021-06-08 11.28.56.png
なぜかProxy protocol v2が有効だったのでチェック外す。

% curl -v --key private.pem --cert cert.crt -k "https://example.jp"
*   Trying xxx...
* TCP_NODELAY set
* Connected to example.jp (xxx) port 443 (#0)
* ALPN, offering h2
* ALPN, offering http/1.1
* successfully set certificate verify locations:
*   CAfile: /etc/ssl/cert.pem
  CApath: none
* TLSv1.2 (OUT), TLS handshake, Client hello (1):
* TLSv1.2 (IN), TLS handshake, Server hello (2):
* TLSv1.2 (IN), TLS handshake, Certificate (11):

略

< HTTP/1.1 404 Not Found

とりあえず正常に通過しました。

1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0