Filtering all requests

Good afternoon.

The question is, can I filter all traffic before Host or HostSNI works in a dynamic file?
What for? Lots of junk requests like

vendor/phpunit/phpunit/src/Util/PHP/eval-stdin.php
/pve2/ext6/theme-crisp/resources/theme-crisp-all.css
/Index/\think\app/invokefunction&function=call_user_func_array&vars[0]=md5&vars[1][]=HelloThinkPHP21
/pwt/css/ext6-pmx.css?ver=2.6-1
/proxmoxlib.js?ver=2.6-1
/phpmyadmin2014/index.php?lang=en

I want to proactively reject such requests before the rules are triggered. That is, some global filter that rejects vendor||pve2||HelloThinkPHP||phpmyadmin2014 requests.

I have settings for each host in separate files and it will be inconvenient to edit each one.

Thanks in advance.

Hi @n1kt0

I believe that would be the works of a WAF, currently we don't have any middleware to do that out of the box but I see there are some community plugins available in the catalog that deal with modsecurity and other WAF implementations.

Take a look and let us know if any of them is a good fit, it might be helpful for other users as well :slight_smile: