BBQ Firewall is a lightweight, super-fast plugin that protects your site against a wide range of threats. BBQ checks all incoming traffic and quietly blocks bad requests containing nasty stuff like
base64_, and excessively long request-strings. This is a simple yet solid solution for sites that are unable to use a strong Apache/.htaccess firewall.
BBQ is as lightweight as possible, so there are no options to configure the firewall rules. The default rules are context-neutral and work great on any WordPress setup. But there may be cases where you want to add or remove patterns from the firewall rules. So to give the plugin more flexibility, here are a couple of free addons that enable you to customize the BBQ firewall rules.
Remove patterns from BBQ firewall rules
If you’re running BBQ and discover that it’s blocking some legitimate URL, you can “whitelist” the offending pattern to restore access. Let’s look at an example.
Let’s say that BBQ is blocking a page located at the following URL:
This URL is blocked by BBQ because of the colon
:, which is a reserved character.
To resolve the issue, we can install the BBQ whitelist plugin and remove the matching pattern from
$request_uri_array. To do so, open the plugin file and edit the “whitelist items” like so:
$bbq_whitelist_request_uri_items = array('\/http\:', '\:\/\/');
Here we have added two items to the whitelist array,
\:\/\/. Save, upload, and done. BBQ now will ignore the specified patterns and thus restore access to the URL. This solution can be used to resolve any false positive.
Add patterns to BBQ firewall rules
On the other side of the coin, let’s say that you have some string that you would like BBQ to block. For example, the infamous
fckeditor seems to be a perpetual target for malicious scanning and wannabe exploits. So let’s block once and for all by adding it to BBQ.
To do it, first install the BBQ blacklist plugin. Then open the plugin file and edit the “blacklist items” like so:
$bbq_blacklist_request_uri_items = array('fckeditor'); $bbq_blacklist_query_string_items = array('fckeditor'); $bbq_blacklist_user_agent_items = array('fckeditor'); $bbq_blacklist_referrer_items = array('fckeditor');
Here we have added the offending string to each of the four blacklist arrays, so we’re covered if the string appears in the request URL, query string, user agent, and/or referrer. Then save, upload, and done. BBQ now will block the pesky
fckeditor pattern whenever and wherever it’s found.
Download the free BBQ addons:
New! As of BBQ version 20201123, you can can customize long-request handling, pattern-match logging, and blocked response headers. Learn more and download the free BBQ customize plugin.