Firewall & WAF

WordPress Application Firewall with 7 rule categories, security hardening checklist, and HTTP security headers management.

WAF Rule Categories

The firewall inspects every incoming request and blocks those matching known attack patterns. Rules are organized into 7 categories:

CategoryDescriptionExample Patterns
SQL Injection (SQLi)Detects attempts to inject SQL commands via input fields, URLs, and cookiesUNION SELECT, OR 1=1, DROP TABLE
Cross-Site Scripting (XSS)Blocks injection of malicious JavaScript and HTML<script>, onerror=, javascript:
Local File Inclusion (LFI)Prevents path traversal attacks to read local files../../etc/passwd, php://filter
Remote File Inclusion (RFI)Blocks attempts to include remote malicious fileshttp://evil.com/shell.php
Remote Code Execution (RCE)Detects command injection and code execution attempts; cat /etc/passwd, eval(
Scanner DetectionIdentifies automated vulnerability scannersWPScan, sqlmap, Nikto, Nessus user agents
Comment SpamBlocks spam bot comment submissionsExcessive links, known spam patterns, missing referrer

Each category can be independently enabled or disabled from VistoShield → Firewall → Rules.

WAF Modes

ModeBehavior
LearningLogs all matches but does not block any requests. Use this when first enabling the WAF to identify false positives.
ActiveBlocks requests that match enabled rules and logs the event.
DisabledWAF is completely off. No inspection occurs.
Tip: Start in Learning mode for 1–2 weeks, review the logs for false positives, add any necessary whitelisting rules, then switch to Active mode.

Security Hardening Checklist

The hardening tab provides one-click toggles for common WordPress security measures:

Hardening RuleWhat It Does
Disable XML-RPCBlocks xmlrpc.php to prevent brute force and DDoS amplification attacks
Disable file editingSets DISALLOW_FILE_EDIT to prevent plugin/theme editor access
Hide WordPress versionRemoves the version meta tag and generator output
Block author enumerationPrevents ?author=N user discovery scans
Disable directory listingAdds index files to prevent directory browsing
Protect wp-config.phpBlocks direct access to the configuration file
Protect .htaccessBlocks direct access to Apache configuration files
Block PHP in uploadsPrevents PHP execution in wp-content/uploads/
Disable REST API for guestsRestricts REST API access to authenticated users

Security Headers

Manage HTTP response headers from the Headers tab:

HeaderDefault Value
X-Content-Type-Optionsnosniff
X-Frame-OptionsSAMEORIGIN
X-XSS-Protection1; mode=block
Referrer-Policystrict-origin-when-cross-origin
Permissions-PolicyConfigurable per-feature
Content-Security-PolicyCustomizable via the CSP builder
Strict-Transport-Securitymax-age=31536000; includeSubDomains
Warning: A misconfigured Content-Security-Policy can break your site's frontend. Use the CSP builder's "report-only" mode first to test before enforcing.

Whitelisting

If a WAF rule causes false positives, you can whitelist specific requests:

  • By URL path — Exclude specific pages (e.g., /wp-admin/post.php)
  • By parameter — Exclude specific query/post parameters
  • By IP — Exclude trusted IP addresses from WAF inspection
  • By rule ID — Disable a specific rule for a specific URL

Firewall Logs

All blocked requests are logged in VistoShield → Firewall → Logs with:

  • Timestamp, source IP, and country
  • Request URI, method, and matched rule
  • The specific payload that triggered the rule
  • Action taken (blocked, logged, challenged)