LIVE
Protecting your website
Health
100
/100
0
blocks/min
Last 10s
+0
Stable
Live / 10s
Last
2026-02-07
TB2X Firewall
Security Dashboard
Live blocked feed updates every 10 seconds. Website column shows domain only.
2026-02-07
Stats OK
Network shield active
Global defense mesh
Install / Embed
WP plugin
PHP snippet
WordPress plugin + losse snippet voor andere sites.
Countries
Blocked
69
IPs
Blocked
43.479
Agents
Blocked
331
Logs
Visitor / Blocked
3.662
/
3.426
Last 30 days
Blocked vs Total
World Blocks Map
Tracked:
69
Max hits:
9.462
Top Countries (live window)
Updating every 10 seconds…
Country
Live share
Hits
Loading…
Live Block Feed
Live
Refresh
ID
IP
Country
Website (domain)
Why
Agent
Loading…
Embed Code
WordPress plugin
Copy
<?php /* Plugin Name: TB2X Firewall Description: WordPress firewall die verbindt met TB2X cloud (tb2x.com) voor IP/country blocking. Version: 1.1 Author: TB2X */ if (!defined('ABSPATH')) { exit; } add_action('init', 'tb2x_firewall_check', 0); function tb2x_firewall_check() { static $checked = false; if ($checked) return; $checked = true; if (is_user_logged_in()) return; if (get_option('firewall_enabled', '1') !== '1') return; $agent = $_SERVER['HTTP_USER_AGENT'] ?? ''; $ipToCheck = $_SERVER['REMOTE_ADDR'] ?? ''; $countryCode = $_SERVER['HTTP_GEOIP_COUNTRY_CODE'] ?? ($_SERVER['GEOIP_COUNTRY_CODE'] ?? 'N/A'); $scheme = (empty($_SERVER['HTTPS']) || $_SERVER['HTTPS'] === 'off') ? 'http' : 'https'; $host = $_SERVER['HTTP_HOST'] ?? ''; $uri = $_SERVER['REQUEST_URI'] ?? '/'; $website = $scheme . '://' . $host . $uri; if ($ipToCheck === '' || $host === '') return; $url = 'https://www.tb2x.com/admin/firewall.php?' . http_build_query([ 'ip' => $ipToCheck, 'country' => $countryCode, 'website' => $website, 'agent' => $agent, ]); $response = tb2x_make_curl_request($url, 8); // fail-open if TB2X unreachable if (!$response || !is_array($response)) return; if (!empty($response['blocked'])) { wp_redirect('https://www.google.com', 302); exit; } } function tb2x_make_curl_request($url, $timeout = 10) { if (!function_exists('curl_init')) return null; $ch = curl_init($url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_TIMEOUT, (int)$timeout); curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 4); $response = curl_exec($ch); if (curl_errno($ch)) { curl_close($ch); return null; } $httpCode = (int)curl_getinfo($ch, CURLINFO_HTTP_CODE); curl_close($ch); if ($httpCode !== 200 || !$response) return null; $data = json_decode($response, true); if (json_last_error() !== JSON_ERROR_NONE) return null; return $data; }
Non-WordPress snippet
Copy
<?php // TB2X Firewall Snippet (non-WordPress PHP) // Plaats zo hoog mogelijk (bovenaan index.php / bootstrap / init) $ip = $_SERVER['REMOTE_ADDR'] ?? ''; $agent = $_SERVER['HTTP_USER_AGENT'] ?? ''; $country = $_SERVER['HTTP_GEOIP_COUNTRY_CODE'] ?? ($_SERVER['GEOIP_COUNTRY_CODE'] ?? 'N/A'); $scheme = (empty($_SERVER['HTTPS']) || $_SERVER['HTTPS']==='off') ? 'http' : 'https'; $website = $scheme.'://'.($_SERVER['HTTP_HOST'] ?? '').($_SERVER['REQUEST_URI'] ?? '/'); $url = 'https://www.tb2x.com/admin/firewall.php?' . http_build_query([ 'ip'=>$ip,'country'=>$country,'website'=>$website,'agent'=>$agent ]); if (function_exists('curl_init')) { $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_TIMEOUT => 8, CURLOPT_CONNECTTIMEOUT => 4, ]); $resp = curl_exec($ch); $code = (int)curl_getinfo($ch, CURLINFO_HTTP_CODE); curl_close($ch); if ($code === 200 && $resp) { $data = json_decode($resp, true); if (!empty($data['blocked'])) { header('Location: https://www.google.com', true, 302); exit; } } }
© 2026 TB2X