– Mayank Gupta
Features | Free | Pro | Business | Enterprise |
---|---|---|---|---|
Number of custom CloudFlare firewall rules | 5 | 20 | 100 | 1000 |
Support for regular expressions | No | No | Yes | Yes |
Due to it’s popularity, WordPress is the most sought after target for most of the hackers.
Source: WP Clipboard
(http.request.uri contains "/wp-admin/admin-ajax.php" and not http.referer contains "yourwebsite.com")
or (http.request.uri contains "/xmlrpc.php" and not http.referer contains "yourwebsite.com")
or (http.request.uri contains "/wp-login.php" and ip.geoip.country ne "US")
or (http.request.uri contains "author")
or (http.request.uri.path contains "/wp-includes" and not http.referer contains "yourwebsite.com" and not http.cookie contains "wordpress_logged_in")
or (http.request.uri.path contains "/wp-admin" and not http.referer contains "yourwebsite.com" and not http.cookie contains "wordpress_logged_in")
or (http.request.uri.path contains "wp-json" and not http.cookie contains "wordpress_logged_in")
or (http.request.method eq "POST" and ip.geoip.country ne "US" and not http.cookie contains "wordpress_logged_in")
IMPORTANT NOTES
(http.request.uri contains "/wp-admin/admin-ajax.php" and not http.referer contains "yourwebsite.com")
or (http.request.uri contains "/xmlrpc.php" and not http.referer contains "yourwebsite.com")
or (http.request.uri contains "/wp-login.php" and ip.geoip.country ne "US")
or (http.request.uri contains "author")
or (http.request.uri.path contains "/wp-includes" and not http.referer contains "yourwebsite.com" and not http.cookie contains "wordpress_logged_in")
or (http.request.uri.path contains "/wp-admin" and not http.referer contains "yourwebsite.com" and not http.cookie contains "wordpress_logged_in")
or (http.request.uri.path contains "wp-json" and not http.cookie contains "wordpress_logged_in")
or (http.request.method eq "POST" and ip.geoip.country ne "US" and not http.cookie contains "wordpress_logged_in")
And
and OR
to avoid creating multiple custom rules/wp-admin/admin-ajax.php
, /wp-login.php
, /xmlrpc.php
or author
is in the path.and not http.referer contains "yourwebsite.com"
Will ensure that it’ll not block requests generated by WordPress themes & plugins to these URLs.author
in the URL to avoid user enumeration.ne "US"
will also ensure that the requests from any country other than United States will be blocked.and ip.geoip.country ne "IN"
right after “US” and before closing bracket.(http.request.uri contains "/wp-admin/admin-ajax.php" and not http.referer contains "yourwebsite.com")
or (http.request.uri contains "/xmlrpc.php" and not http.referer contains "yourwebsite.com")
or (http.request.uri contains "/wp-login.php" and ip.geoip.country ne "US")
or (http.request.uri contains "author")
or (http.request.uri.path contains "/wp-includes" and not http.referer contains "yourwebsite.com" and not http.cookie contains "wordpress_logged_in")
or (http.request.uri.path contains "/wp-admin" and not http.referer contains "yourwebsite.com" and not http.cookie contains "wordpress_logged_in")
or (http.request.uri.path contains "wp-json" and not http.cookie contains "wordpress_logged_in")
or (http.request.method eq "POST" and ip.geoip.country ne "US" and not http.cookie contains "wordpress_logged_in")
http.request.uri.path
is similar to the rule http.request.uri
as explained earlier.not http.cookie contains "wordpress_logged_in"
means don’t block the request when wordpress_logged_in
cookie is set.IMPORTANT
We need to ensure that you choose the cookie that is set only when the user is logged in, to avoid blocking requests for logged in users.(http.request.uri contains "/wp-admin/admin-ajax.php" and not http.referer contains "yourwebsite.com")
or (http.request.uri contains "/xmlrpc.php" and not http.referer contains "yourwebsite.com")
or (http.request.uri contains "/wp-login.php" and ip.geoip.country ne "US")
or (http.request.uri contains "author")
or (http.request.uri.path contains "/wp-includes" and not http.referer contains "yourwebsite.com" and not http.cookie contains "wordpress_logged_in")
or (http.request.uri.path contains "/wp-admin" and not http.referer contains "yourwebsite.com" and not http.cookie contains "wordpress_logged_in")
or (http.request.uri.path contains "wp-json" and not http.cookie contains "wordpress_logged_in")
or (http.request.method eq "POST" and ip.geoip.country ne "US" and not http.cookie contains "wordpress_logged_in")
http.request.method eq "POST"
ensures that any POST requests (used to fill out forms or send data to the server) are blocked.NOTE
In frontend, no form will be filled though.and not http.request.uri.path contains "/contact"
to chain in line 8 to allow any contact form submissions.(cf.client.bot)
or (ip.src eq xx.xx.xx.xx)
or (http.request.uri.query contains "AnySecretQueryString")
(cf.client.bot)
or (ip.src eq xx.xx.xx.xx)
or (http.request.uri.query contains "AnySecretQueryString")
(cf.client.bot)
or (ip.src eq xx.xx.xx.xx)
or (http.request.uri.query contains "AnySecretQueryString")
(cf.client.bot)
or (ip.src eq xx.xx.xx.xx)
or (http.request.uri.query contains "AnySecretQueryString")