Reading real IPs
Publisher: Psychz Networks, April 13,2017Need to see your client's real IPs through our CDN service? NO problem!
NGINX:
Nginx makes this super simple and to the point. Compile your nginx build with "--with-http_realip_module"
./configure --with-http_realip_module
Then in the location{} directive (or server/http) place the following:
set_real_ip_from 103.126.138.82/32;
set_real_ip_from 172.107.92.10/32;
set_real_ip_from 68.168.30.2/32;
set_real_ip_from 103.78.122.66/32;
set_real_ip_from 172.106.111.18/32;
set_real_ip_from 172.107.94.26/32;
set_real_ip_from 23.238.135.42/32;
set_real_ip_from 23.228.221.74/32;
set_real_ip_from 45.34.165.2/32;
set_real_ip_from 172.107.96.42/32;
set_real_ip_from 103.78.121.195/32;
set_real_ip_from 103.102.161.112/32;
set_real_ip_from 172.107.196.222/32;
set_real_ip_from 172.107.207.220/32;
real_ip_header X-Forwarded-For;
real_ip_recursive on;
We will update the list as we add more nodes!
Apache
Create a file such as "trusted-proxies.list", to stick to the docs, we'll put ours in the "conf" folder.
Place the following IPs in your trusted-proxies.list file:
103.126.138.82/32
172.107.92.10/32
68.168.30.2/32
103.78.122.66/32
172.106.111.18/32
172.107.94.26/32
23.238.135.42/32
23.228.221.74/32
45.34.165.2/32
172.107.96.42/32
103.78.121.195/32
103.102.161.112/32
172.107.196.222/32
172.107.207.220/32
Note: This list will be updated as we add more nodes!
then Simply add the following to your apache config:
RemoteIPInternalProxyList conf/trusted-proxies.lst
and change your log file (typically /etc/apache2/apache2.conf) to:
We'll update this tutorial with more web servers as needed, stay tuned! In case you are using a different web server contact our support for help.