Require expr "req_novary('CF-Connecting-IP') -ipmatch '1.2.3.0/24' "
Require expr "req_novary('CF-Connecting-IP') -ipmatch '7.7.7.7' "
RewriteEngine On
RewriteCond %{HTTP:CF-Connecting-IP} !^1\.2\.3
RewriteCond %{HTTP:CF-Connecting-IP} !=7.7.7.7
RewriteRule ^ - [R=403,L]