Some servers show real IP, others won't (same server configuration with nginx)

What is the name of the domain?

museum.booqi.me

What is the issue you’re encountering

Our servers all show the real client UP, expect the servers in our Frankfurt datacenter. They are unable to retrieve the real IP’s.

What steps have you taken to resolve the issue?

Our servers all run the exact same Docker images with the same nginx configuration that uses this block to get the real client IP:

set_real_ip_from 103.21.244.0/22;
set_real_ip_from 103.22.200.0/22;
set_real_ip_from 103.31.4.0/22;
set_real_ip_from 104.16.0.0/13;
set_real_ip_from 104.24.0.0/14;
set_real_ip_from 108.162.192.0/18;
set_real_ip_from 131.0.72.0/22;
set_real_ip_from 141.101.64.0/18;
set_real_ip_from 162.158.0.0/15;
set_real_ip_from 172.64.0.0/13;
set_real_ip_from 173.245.48.0/20;
set_real_ip_from 188.114.96.0/20;
set_real_ip_from 190.93.240.0/20;
set_real_ip_from 197.234.240.0/22;
set_real_ip_from 198.41.128.0/17;

real_ip_header CF-Connecting-IP;

This seems to work just fine on, for example, our Amsterdam servers. We get the real client IP’s there. However on the Frankfurt servers we do not get the real IP.

So our servers run the exact same setup on server level. The only difference could be to how they are set up within the management portals of the data centers. What settings should we look for?

What feature, service or problem is this related to?

I don’t know

And what IP do you see instead?

I mainly see 145.102.247.21 whenever someone visits from the Frankfurt data center. On our Amsterdam servers, for example, we see the correct real IP’s.

But that is not a Cloudflare IP address.

That’s correct. However, I do want to point out that we still do not run with proxy enabled (you gave me some good guidance in another post about this). Also this IP is not known to us either. It seems to be owned by some Dutch company.

Do you have any guesses as to why it shows this IP?

In that case, the above configuration does nothing. You don’t need to replace Cloudflare’s IPs if requests aren’t coming from Cloudflare’s IPs in the first place.

I would guess that someone is making requests to your server from that IP.

Thanks for your clarification. We’ll be enabling the proxy next week once we migrate al the hostnames.

This IP is logged each time a user comes into our system through the Frankfurt datacenter. It shows this IP for me as well when I come from the Frankfurt datacenter. So I think we need to find out where this IP is coming from.

Thanks for your help.

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.