Hi,
In a reverse proxy situation I am trying to ban an ip-address if it asks for a url that does not exist on the backend server.
I have tried the config below, but keep getting banned.
I presume because RequestURI exists only applies to files on disk, and not files on the disk of a back-end server.
Is my assumption correct? Is there a workaround?
UrlToolkit {
ToolkitID = block_pman404
MatchCI phpMyAdmin/.* Ban 3600
MatchCI /Admin Ban 3600 ##CI is case incensitive
Header User-Agent bot Exit #allow bots
Header User-Agent spider Exit #allow bots
Header User-Agent crawler Exit #allow bots
RequestURI exists Exit #if uri exists, go on
do Ban 3600 #if uri does not exist, ban IP
}
VirtualHost {
Hostname = www.hanscees.com, *.hanscees.com
ReverseProxy !^/.well-known/ http://172.16.0.101:80/
#RequireTLS = yes
TLScertFile = /etc/letsencrypt/live/www.hanscees.com/hiawatha-hc.pem
WebsiteRoot /var/www/hcs
UseToolkit = block_pman404
}