I am trying to find a satisfying solution to protect the access to my WP admin area.
The point is that I am accessing always from a dynamic IP of my provider.
The best solution I found is to create a firewall rule excluding all IPs different from my provider.
The point is that my ISP is big so there are plenty of attacks coming to the physical WP box anyway.
I was trying to adopt a Cloudflare Client Certificate to make the protection really effective.
Unfortunately with very limited success …
Strangely there is no guide / tutorial for this scenario that I suppose is very common.
Theoretically, I followed here:
I protect my WordPress backend (/wp-admin), login access (/wp-login-php, /xmlrpc.php) and even, depending on the installation, WP’s REST API endpoints (/wp-json), with Access Policies. Access is now part of Zero Trust, but you can configure Access Policies right on Dashboard > Access.
Your rule is blocking all requests containing “php”. Firewall rules’ logical operators have an implicit order of precedence, which you can modify by grouping them appropriately.
Have you tried the Access Policy I suggested? It has the added advantage of not cluttering your Firewall Events log with a very large number of attempts against your /wp-admin/ area.