• caglararli@hotmail.com
  • 05386281520

Ban user IP address by HTTP request?

Çağlar Arlı      -    2 Views

Ban user IP address by HTTP request?

I can sometimes see in the server logs records caused by series of “strange” HTTP requests such as

2024.10.16 16:21:00 /index.php?lang=../../../../../../../../usr/local/lib/php/pearcmd&+config-create+/&/<?echo(md5("hi"));?>+/tmp/index1.php <- null Error
2024.10.16 16:20:58 /apps/vendor/phpunit/phpunit/src/Util/PHP/eval-stdin.php <- null Error
2024.10.16 16:20:59 /index.php?s=/index/\think\app/invokefunction&function=call_user_func_array&vars[0]=md5&vars[1][]=Hello <- null Error

that looks like some kind of hacker activity

Is there any function in Plesk or Apache to ban IP addresses by the request URL automatically? Or I would have to write my own PHP code for this.