I can't get the client's real ip

Dear
How are you?

I have cloudflare installed to my domain with prestashop and I can’t get the client’s real ip

I followed the manual https://wiki.centos-webpanel.com/how-to-install-mod_cloudflare

But it does not work

thank you

If @eva2000 is still awake, he might have some ideas. mod_cloudlare is old news. remote_ip is the way to do it.

2 Likes

Yup for Apache use mod_remoteip for real IP set as per https://support.cloudflare.com/hc/en-us/articles/360029696071-Restoring-original-visitor-IPs-Option-2-Installing-mod-remoteip-with-Apache

2 Likes

my webserver
Nginx & Varnish & Apache

the ip’s are fine,
/etc/nginx/cloudflare.inc

Cloudflare https://www.cloudflare.com/ips

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/12;
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;
#set_real_ip_from 2400:cb00::/32;
#set_real_ip_from 2606:4700::/32;
#set_real_ip_from 2803:f800::/32;
#set_real_ip_from 2405:b500::/32;
#set_real_ip_from 2405:8100::/32;
#set_real_ip_from 2c0f:f248::/32;
#set_real_ip_from 2a06:98c0::/29;
real_ip_header CF-Connecting-IP;

Dear

on the server I have two domains .cl and com

and I have noticed that in the .com it works fine I get the real IP

but in the .cl no, and this domain comes from another hosting with cloudflare and when I deactivate it cloudflare I have the real ip of the client ( https://bit.ly/2GdBJFy )

What I can do ?
thank you

Dear sdayman

What I can do?

this domain comes from another hosting with cloudflare and when I deactivate it cloudflare I have the real ip of the client https://bit.ly/2GdBJFy

Thank you

Whatever hosting you use, you need to configure the server to restore real IP addresses using the method I posted above. Have you asked your host for help?

I install my server on centos myself
Nginx & Varnish & Apache

and that only domain is the problem

I’m going to review and I comment

Thank you

I have tried to follow the manual but have not been successful

how can I with the command sudo a2enmod remoteip
for centos 7

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