Help: Someone is scanning my server to try to find vulnerability and how to get rid of them

Posted by squirel_ai@reddit | linuxadmin | View on Reddit | 17 comments

Since the beginning of this month, I have someone trying to break into my server for unknow reason.
I have tried reporting their IP address mostly to Digital Ocean and tried to block some IP addresses but in vain.

These are the kind of logs I get:

- - [15/Oct/2024:14:02:21 +0000] "GET /jobs/job/40235391 HTTP/1.1" 200 6373 "-" "facebookexternalhit/1.1 (+http://www.facebook.com/externalhit_uatext.php)"

Expanse, a Palo Alto Networks company, searches across the global IPv4 space multiple times per day to identify customers' presences on the Internet. If you would like to be excluded from our scans, please send IP addresses/domains to: scaninfo@paloaltonetworks.com"

[16/Oct/2024:02:57:50 +0000] "POST /HNAP1/ HTTP/1.1" 404 196 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/42.0.2311.135 Safari/537.36 Edge/12.246"

- - [16/Oct/2024:09:00:37 +0000] "\x16\x03\x02\x01o\x01" 400 226 "-" "-"

- - [16/Oct/2024:09:37:54 +0000] "POST /hello.world?%ADd+allow_url_include%3d1+%ADd+auto_prepend_file%3dphp://input HTTP/1.1" 404 196 "-" "Custom-AsyncHttpClient"

They also tried to brute force root login and many other exploits, mostly looking for PHP vulnerability. For root login, the server requires a private and public key. I don't even know if it is secure.
I doubt it is from these companies. Seem like someone got time and is trying to make me trust them.

Is there any way to block these kinds of scans from my server?