Skip to content

Instantly share code, notes, and snippets.

View pstoute's full-sized avatar

Paul Stoute pstoute

View GitHub Profile
@pstoute
pstoute / checkview-whitelists-7g-context.conf
Last active June 12, 2025 18:00
This is the whitelist for Checkview.io on GridPane managed sites running the 7G firewall. Add the file to your "/etc/nginx/extra.d/" directory then test nginx using "nginx -t" and if it passes, run "gp ngx reload" to restart Nginx.
set $exclusion_rule_match "";
if ( $uri ~ ^/wp-json/checkview/v1/forms/formstestresults ) {
set $exclusion_rule_match 6;
}
if ( $args ~* ^&_checkview_token= ) {
set $exclusion_rule_match 6;
}
if ($bad_request_7g = $exclusion_rule_match) {
@pstoute
pstoute / Block-High-Risk-Countries-Block-Web-Host-Paths-TOR.txt
Created April 17, 2025 19:17
Cloudflare WAF - Block High Risk Countries / Block Web Host / Paths / TOR
(ip.geoip.asnum in {26496 31815 18450 398101 50673 7393 14061 205544 199610 21501 16125 51540 264649 39020 30083 35540 55293 36943 32244 6724 63949 7203 201924 30633 208046 36352 25264 32475 23033 32475 212047 32475 31898 210920 211252 16276 23470 136907 12876 210558 132203 61317 212238 37963 13238 2639 20473 63018 395954 19437 207990 27411 53667 27176 396507 206575 20454 51167 60781 62240 398493 206092 63023 213230 26347 20738 45102 24940 57523 8100 8560 6939 14178 46606 197540 397630 9009 11878}) or (http.request.uri.path contains "xmlrpc") or (http.request.uri.path contains "wp-config") or (http.request.uri.path contains "wlwmanifest") or (cf.verified_bot_category in {"Other" "AI Crawler"}) or (ip.geoip.country in {"RU" "T1" "CN"})
@pstoute
pstoute / Challenge-Path-VPN-Managed-Challenge.txt
Created April 17, 2025 19:16
Cloudflare WAF - Challenge Path / VPN Managed Challenge
(ip.geoip.asnum in {60068 9009 16247 51332 212238 131199 22298 29761 62639 206150 210277 46562 8100 3214 206092 206074 206164 213074}) or (http.request.uri.path contains "wp-login")
@pstoute
pstoute / Challenge-Large-Providers-Country.txt
Created April 17, 2025 19:14
Cloudflare WAF - Challenge Large Providers / Country
(ip.geoip.asnum in {7224 16509 14618 15169 8075 396982} and not cf.client.bot and not cf.verified_bot_category in {"Search Engine Crawler" "Search Engine Optimization" "Monitoring & Analytics" "Advertising & Marketing" "Page Preview" "Academic Research" "Security" "Accessibility" "Webhooks" "Feed Fetcher" "Aggregator"}) or (not ip.geoip.country in {"CA" "US"} and not cf.client.bot and not cf.verified_bot_category in {"Search Engine Crawler" "Search Engine Optimization" "Monitoring & Analytics" "Advertising & Marketing" "Page Preview" "Academic Research" "Security" "Accessibility" "Webhooks" "Feed Fetcher" "Aggregator"} and not http.request.uri.path contains "acme-challenge")
@pstoute
pstoute / WAF-Allow
Created April 17, 2025 19:11
Cloudflare Allow List
(ip.src in $allowlist) or (cf.client.bot) or (cf.verified_bot_category in {"Search Engine Crawler" "Search Engine Optimization" "Monitoring & Analytics" "Advertising & Marketing" "Page Preview" "Academic Research" "Security" "Accessibility" "Webhooks" "Feed Fetcher" "Aggregator" "Other"}) or (http.user_agent eq "letsencrypt" and http.request.uri.path contains "acme-challenge") or (http.user_agent contains "SearchAtlas Bot") or (http.user_agent contains "WPUmbrella+UptimeMonitoring")
@pstoute
pstoute / wpumbrella-http-context.conf
Created November 17, 2023 21:01
This is the http context file that you need to add to whitelist the IP addresses for WP-Umbrella
geo $wpumbrella_ips {
default 0;
2001:41d0:306:1702::/64 1;
141.95.192.2 1;
}
@pstoute
pstoute / mysql-script.txt
Created September 29, 2023 18:28
How to get the size of each database in your MySQL install in GB
SELECT table_schema "DB Name",
ROUND(SUM(data_length + index_length) / 1024 / 1024 / 1024, 1) "DB Size in GB"
FROM information_schema.tables
GROUP BY table_schema;
@pstoute
pstoute / fortress-ebridge-jitterbit-overrides_APAC-region.php
Created July 18, 2023 15:29
Add this to your /wp-content/mu-plugins/ directory to allow the eBridge or JitterBit connections to your Fortress Secured WordPress site.
<?php
/**
* Plugin Name: GridPane Fortress - Overrrides for eBridge/JitterBit connections | APAC Region
* Description: Companion plugin to the Fortress Security module to whitelist eBridge/JitterBit connections.
* Author: Stoute Web Solutions
* Author URI: https://stoutewebsolutions.com
* Version: 1.0
*/
// This is a replication of the original whitelisted module for ManageWP found here: https://github.com/snicco/fortress/blob/beta/docs/modules/session/sudo-mode.md#skipping-the-sudo-mode-check-for-request-from-managewp
@pstoute
pstoute / fortress-ebridge-jitterbit-overrides_EMEA-region.php
Last active July 18, 2023 15:22
Add this to your /wp-content/mu-plugins/ directory to allow the eBridge or JitterBit connections to your Fortress Secured WordPress site.
<?php
/**
* Plugin Name: GridPane Fortress - Overrrides for eBridge/JitterBit connections | EMEA Region
* Description: Companion plugin to the Fortress Security module to whitelist eBridge/JitterBit connections.
* Author: Stoute Web Solutions
* Author URI: https://stoutewebsolutions.com
* Version: 1.0
*/
// This is a replication of the original whitelisted module for ManageWP found here: https://github.com/snicco/fortress/blob/beta/docs/modules/session/sudo-mode.md#skipping-the-sudo-mode-check-for-request-from-managewp
@pstoute
pstoute / fortress-ebridge-jitterbit-overrides_NA-region.php
Last active July 18, 2023 15:23
Add this to your /wp-content/mu-plugins/ directory to allow the eBridge or JitterBit connections to your Fortress Secured WordPress site.
<?php
/**
* Plugin Name: GridPane Fortress - Overrrides for eBridge/JitterBit connections | NA Region
* Description: Companion plugin to the Fortress Security module to whitelist eBridge/JitterBit connections.
* Author: Stoute Web Solutions
* Author URI: https://stoutewebsolutions.com
* Version: 1.0
*/
// This is a replication of the original whitelisted module for ManageWP found here: https://github.com/snicco/fortress/blob/beta/docs/modules/session/sudo-mode.md#skipping-the-sudo-mode-check-for-request-from-managewp