Thank you for your quick reply!
Your firewall looks great but I’ve tried to include my IP in the BLOCK list in htninja and still I can access my blog without receiving an 403 error. Below some of my code (“xxx” stands for removed info):
define('NFW_ALLOWED_ADMIN', 'xxx');
if (! empty($_SERVER["HTTP_CF_CONNECTING_IP"]) &&
filter_var($_SERVER["HTTP_CF_CONNECTING_IP"], FILTER_VALIDATE_IP) ) {
$_SERVER["REMOTE_ADDR"] = $_SERVER["HTTP_CF_CONNECTING_IP"];}
$ip_array = array('x.x.x', 'x.x.x/12', 'x.x.x/13', 'x.x.x/14', 'x.x.x/15', 'x.x.x/16', 'x.x.x/17', 'x.x.x/20', 'x.x.x/21', 'x.x.x/22', 'x.x.x/23');
if ( in_array( $_SERVER["REMOTE_ADDR"], $ip_array ) ) {
return 'ALLOW'; // whitelist
}
Same thing for ‘BLOCK’, with IPv6s instead of CIDR.
What I’ve done wrong?
Thank you in advance for any support you’d provide.