Reveal real IP for Nginx behind a reverse proxy

Tools / Tutorials

2020.12.25

Reveal real IP for Nginx behind a reverse proxy

I'm currently using LogDNA for gathering Nginx logs. However, I can only see IPs from Cloudflare by default in the logs as my server was proxied by Cloudflare. Let's see how to reveal the real IP address of the client in the logs behind such reverse proxy server by using ngx_http_realip_module.

Allowing Cloudflare IP addresses only in Nginx

Tutorials / Tools

2020.11.18

Allowing Cloudflare IP addresses only in Nginx

If your HTTP server is running behind Cloudflare, it is recommended to only allow traffic from Cloudflare IP addresses. We can configure this systematically using iptables. However, it's also flexible to white list Cloudflare IPs just inside the Nginx service.

Understanding Nginx location directive

Tools

2020.09.12

Understanding Nginx location directive

Location directives are essential when working with Nginx. They can be located within server blocks or other location blocks. Understanding how location directives are used to process the URI of client request can help make the request handling less unpredictable.

Ads by Google
Ads by Google