statianzo / Fleck

C# Websocket Implementation
MIT License
2.28k stars 583 forks source link

In logs I can see "Ssl error:1000009c:SSL routines:OPENSSL_internal:HTTP_REQUEST" #281

Closed punkoffice closed 4 years ago

punkoffice commented 4 years ago

I'm running a secure socket server. It works fine for me and others, but I've noticed in my logs I have quite a few authentication warnings which are "Ssl error:1000009c:SSL routines:OPENSSL_internal:HTTP_REQUEST".

I can't seem to trigger these myself 'cos it always works for me, so I don't know what's causing it or if I can fix it. Has anyone experienced this with their secure socket servers?

AdrianBathurst commented 4 years ago

Nope. Check that maybe non-secure connections are trying to connect on a secure port?

punkoffice commented 4 years ago

Nope. Check that maybe non-secure connections are trying to connect on a secure port?

The connection is made through a website which specifies WSS in the URL. But if you try to connect with your own code the server won't respond if the URL starts with just WS. So I don't know how anyone can even try to connect with a non-secure connection. Maybe some kind of hacker?

statianzo commented 4 years ago

https://github.com/netty/netty/issues/8252 refers to the same error when a client was attempting to connect via http. Likely a crawling bot of some sort.

punkoffice commented 4 years ago

oh I understand now. I can simply type it into the browser address and trigger this HTTP_REQUEST warning. Glad to know its not actual users trying to connect via my website, but bots trying to access it directly.

punkoffice commented 4 years ago

Is it possible to block HTTP requests to certain ports with Fleck, or even with something like ip tables or Apache? It would be cool if I could prevent any attempted HTTP connections to this port