title: whitelist cloudflare Ips with having ngx_http_realip_module enabled
body: <p>I´ve a website on nginx with cloudflare running and want to block all requests which are not coming trough cloudflare.</p>
  
  <p>Normally i´d whitelist the nginx IPs in the nginx configuration and deny all other.</p>
  
  <p>But i´ve ngx_http_realip_module running which sets the X-Forward-For Address( which is the real Ip from the Visitor ) as request-IP and so the request gets denied.</p>
  
  <p>Is there a way to get this whitelist work without deactivating the ngx_http_realip_module? Also this whitelist should only apply to requests to nginx and not to other services</p>
  
  <p>Thanks in advance</p>