Save 15% with code SAVE15

Firewall & Patterns

String-matching firewall with 600+ patterns, input normalization pipeline, and 5 scan categories. Per-pattern toggles, custom patterns, hit tracking, and response codes.

Last updated Feb 22, 2026

Overview

The ArmorPro firewall is a request-level filter that inspects every incoming HTTP request and blocks those that match known malicious patterns. It runs inside WordPress on every page load, checking the request URI, query string, user agent, referrer, and IP address against its pattern database.

Unlike regex-based firewalls, ArmorPro uses stripos string matching for pattern detection. This approach is significantly faster and eliminates the risk of ReDoS (Regular Expression Denial of Service) attacks that can be used against regex-based firewalls.

Master toggle

The firewall is controlled by a master toggle at the top of the Firewall tab. When disabled, no requests are inspected or blocked. All firewall settings and the pattern manager are hidden until the toggle is enabled.

How it works

On every request, the firewall checks the following components against all enabled patterns:

  1. The request URI is checked against Request URI and IP Address patterns
  2. The query string is checked against Query String patterns
  3. The user agent header is checked against User Agent patterns
  4. The referrer header is checked against Referrer patterns

If any pattern matches, the request is immediately blocked with the configured response code. The block is logged in the firewall log with the matched pattern and request details.

Input normalization

Before pattern matching, ArmorPro normalizes every request field through a multi-step pipeline. This prevents attackers from bypassing patterns by encoding their payloads in different ways. The normalization runs automatically on every request with zero configuration.

StepWhat it doesEvasion it prevents
URL decodingDouble rawurldecode() to catch double-encoded payloads%65val or %2565val becoming eval
HTML entity decodingDecodes 30 named HTML entities plus all numeric entities (e, e)eval( becoming eval(
Hex escape decodingConverts \x41 style hex escapes to their ASCII character\x65val becoming eval
Octal escape decodingConverts \101 style octal escapes to their ASCII character\145val becoming eval
Unicode escape decodingConverts %u0041, \u0041, and \u{41} formats%u0065val becoming eval
SQL comment strippingRemoves inline SQL comments (/* */) used to break up keywordsev/**/al becoming eval, un/*x*/ion becoming union
Concatenation removalRemoves string concatenation operators between quotes ('+', '.')'ev'+'al' becoming 'eval'
Null byte strippingRemoves \x00 and %00 null bytesNull byte injection to truncate strings or bypass filters

All normalization steps run in sequence, so combined evasion techniques (for example, HTML-encoding a hex escape) are also caught. The normalized value is only used for pattern matching; the original request is preserved for logging.

Built-in patterns

ArmorPro ships with over 600 built-in patterns across five categories:

CategoryWhat it blocksExamples
Request URIDangerous paths, shell files, exploit pathswp-config.php, .env, shell.php
Query StringSQL injection, malicious parametersUNION SELECT, eval(, base64_decode
User Agent120+ known scanners, scrapers, attack toolssqlmap, nikto, masscan
ReferrerSpam referrersKnown referrer spam domains
IP AddressKnown malicious IP patternsCommonly abused IP ranges

Pattern matching modes

Each pattern uses one of three matching modes:

  • contains — Matches if the pattern string appears anywhere in the checked value (substring match)
  • endswith — Matches if the checked value ends with the pattern string (suffix match)
  • contains_path — Matches against the URI path component only, ignoring query strings

Pattern manager

The pattern manager is the main interface for viewing and controlling firewall patterns. It is located in the Firewall tab below the master toggle.

Pattern table

Each pattern is displayed in a table row with the following columns:

  • Enabled — Toggle switch to enable or disable the individual pattern
  • Category — Which request component the pattern checks (Request URI, Query String, User Agent, Referrer, IP Address)
  • Pattern — The actual string being matched against
  • Description — A brief explanation of what the pattern blocks
  • Hits — The number of times this pattern has matched and blocked a request

Filtering and management

Use the category filter dropdown to view patterns from a specific category. You can enable or disable individual patterns without affecting others. The Reset Hit Counters button clears all hit counts back to zero.

Custom patterns

You can add your own patterns to extend the firewall beyond the built-in set. Custom patterns use the same string matching engine as built-in patterns.

To add a custom pattern:

  1. Find the Add Custom Pattern form in the Firewall tab
  2. Select a Category (Request URI, Query String, User Agent, Referrer, or IP Address)
  3. Enter the Pattern string to match
  4. Add a Description explaining what it blocks
  5. Click Add Pattern

Custom patterns can be toggled on and off or deleted entirely. Built-in patterns can be toggled but not deleted.

Important

Patterns use string matching (stripos), not regular expressions. A pattern of eval( will match any request containing that exact substring. This is intentional: it prevents ReDoS attacks and keeps pattern matching fast, but it means patterns match substrings anywhere in the checked value.

Firewall settings

Request length limit

Block requests with an unusually large URI or query string. This can prevent certain buffer overflow and injection attacks that rely on oversized payloads. Disabled by default.

Skip logged-in users

When enabled, authenticated WordPress users bypass the firewall entirely. This is off by default. Enable it if the firewall is causing false positives for your logged-in administrators or editors.

Auto-blacklist threshold

IPs that trigger the firewall repeatedly can be automatically added to the permanent blacklist. Options: disabled (default), 3, 5, 10, 15, or 20 firewall hits. When triggered, the IP is added to the Access Control blacklist.

Response code

Choose which HTTP response code is returned to blocked requests:

  • 403 Forbidden — Standard denial response. The visitor sees an error page.
  • 410 Gone — Tells the requester the resource is permanently gone. Can discourage further scanning.
  • 444 Connection Closed — Drops the connection without sending any response body. The most aggressive option, giving attackers no information at all.

Firewall log

Every blocked request is recorded in the firewall log, accessible from the Firewall tab. The log shows:

ColumnDescription
IPThe blocked IP address
CountryCountry of origin based on GeoIP lookup
Matched RuleThe specific pattern that triggered the block
Request InfoThe URI, query string, and HTTP method of the blocked request
TimeWhen the block occurred
ActionsWhitelist or blacklist the IP

The log can be exported as a CSV file. Log retention is 7 days on the free tier and 90 days on Pro.

Custom block page

When a request is blocked by the firewall (using 403 or 410 response codes), ArmorPro renders a custom block page informing the visitor that their request was denied. The page is clean, branded, and does not reveal which specific pattern was matched.

Tip

If you see false positives in the firewall log (legitimate requests being blocked), disable the specific pattern causing the issue rather than turning off the entire firewall. Use the category filter to quickly find the pattern, then toggle it off.

Enhanced firewall

The standard firewall runs inside WordPress after PHP and WordPress have fully loaded. For maximum protection, ArmorPro also offers an Enhanced Firewall (WAF) that runs at the PHP engine level before WordPress loads, blocking malicious requests even earlier in the request lifecycle.