大网数据广告活动
服务器运维问答

Nginx log shows ssl handshake errors

· 52CE 我爱测

I have seen my nginx error log is full of messages like this: (*date*) [info] 69487#0: *1064573 peer closed connection in SSL handshake while SSL handshaking, client: 95.64.*.*, server: 0.0.0.0:443 (*date*) [info] 69487#0: *10645…

问题原文

原帖链接 · fernandezr · CC BY-SA 4.0

I have seen my nginx error log is full of messages like this:

(*date*) [info] 69487#0: *1064573 peer closed connection in SSL handshake while SSL handshaking, client: 95.64.*.*, server: 0.0.0.0:443
(*date*) [info] 69487#0: *1064574 peer closed connection in SSL handshake (104: Connection reset by peer) while SSL handshaking, client: 95.162.*.*, server: 0.0.0.0:443
(*date*) [info] 69487#0: *1064572 peer closed connection in SSL handshake while SSL handshaking, client: 5.112.*.*, server: 0.0.0.0:443
(*date*) [info] 69487#0: *1064576 peer closed connection in SSL handshake (104: Connection reset by peer) while SSL handshaking, client: 188.211.*.*, server: 0.0.0.0:443
(*date*) [info] 69487#0: *1064578 peer closed connection in SSL handshake while SSL handshaking, client: 185.120.*.*, server: 0.0.0.0:443
(*date*) [info] 69487#0: *1064577 peer closed connection in SSL handshake while SSL handshaking, client: 5.126.*.*, server: 0.0.0.0:443

Note: I have anonymized dates and ip

The server log contains a lot of similar log lines. I have created a fail2ban rule to filter them all and after a day it has blackilisted more than 6000 ips. A quick look of some of them blacklisted shows that almost all are coming from Iran, but it not appears listed in https://www.abuseipdb.com.

Is this an attack? Or may be I have misconfigured the nginx server? If it is an attack, what type of attack it is? I need to know this to report the IP addresses if they are malicious.

已采纳解答

原帖链接 · sebres · CC BY-SA 4.0

ssh handshake errors

You meant surely SSL (not SSH).

Is this an attack?

Directly seen it is not. This means exactly what it says (connection is closed on stage where normally a SSL handshake would take place). This can have several reasons: e. g. something noticed that your nginx is using method that other side does not support and don't even try to fulfill a handshake. Or it is some unstable or slow connection (gets broken on handshake phase or did not answered within timeout), etc.

Sometimes it is some old browser API (also may be used by some bots) which is simply unable to communicate secure using newest SSL facilities.

But sometimes it is really something intentional, which is organized by botnet in order to flood your log with with "parasitic" log entries or data messages (for example to slow down the monitoring services like IDS/IPS/fail2ban/whatever) or to hide real "attack" attempts by the large traffic (on log or data).

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Server Fault
适用范围
以原帖系统、软件版本与发布日期为准(2021-03-15)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 4.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。