Restore real IP | Cloudflared | Debian 11 Nginx

This post was flagged by the community and is temporarily hidden.

that’s depricated and i believe also fo just cf proxy not tunnels

I’d suggest you below article - scroll down to find Nginx, click on accordion and put IPs into nginx.conf file inside http { ... } block. Save and restart nginx service to show real visitor IP in access/error log files:

i’ll try this

Note that cloudflared will be your originating IP - i.e if it runs on the same box as NGINX then you’ll need to allow 127.0.0.1 to set the real_ip_header.

Similar discussion: Real IP using argo tunnel and Nginx Proxy Manager - #4 by KianNH

yeah nginx and Cloudflare run on the same box

huh??

Read on from that post - you need to also add set_real_ip_from 127.0.0.1; in your directive in addition to the ones from the link posted by fritex.

1 Like

okie :slight_smile:

where do i add this

Cloudflare isn’t supporting or updating mod_cloudflare anymore. But, have a look at the NGINX Webserver Instructions that @fritex had previously linked to.

1 Like