Our servers act as a reverse proxy and filter the requests to your server. By default, only our IP addresses will be shown in the access logs. If you want to get real IP addresses of your visitors set X-Forwarded-For header on your server.

Nginx

Use ngx_http_realip_module.

Contact us via chat or email to support@gcore.com to get an up-to-date list of subnets.

Example lines that should be added to your server configuration:

#Indicates that subnets are trusted

set_real_ip_from 9х.ххх.ххх.х/24;

set_real_ip_from 1хх.ххх.ххх.0/24;

set_real_ip_from 9х.ххх.ххх.х/24;


#Indicates that the X-Forwarded-For header contains the IP addresses

real_ip_header X-Forwarded-For;

Restart Nginx. Add $http_x_forwarded_for variable in a log_format directive to restore visitors' real IP addresses in access logs. 

Apache

Install and configure the mod_remoteip module.

Contact us via chat or email to support@gcore.com to get an up-to-date list of subnets.

For RHEL/CentOS + Apache:

Install the required packages

# yum install gcc wget httpd-devel

Download the source of the module

# wget -O /usr/local/src/mod_remoteip. from https://raw.github.com/ttkzw/mod_remoteip-httpd22/master/mod_remoteip.c

Compile obtained source

# cd /usr/local/src/

# apxs -i -c -n mod_remoteip.so mod_remoteip.c

Create a /etc/httpd/conf.d/mod_remoteip.conf file. 

Example lines that should be added to your file:

Indicates that the remoteip module should be uploaded from this directory

# LoadModule remoteip_module modules/mod_remoteip.so

Indicates that the X-Forwarded-For header contains the IP addresses 

# RemoteIPHeader X-Forwarded-For

Indicates that the SkyparkCDN nodes are trusted

# RemoteIPTrustedProxy 9х.ххх.ххх.х/24;

# RemoteIPTrustedProxy 1хх.ххх.ххх.х/24;

# RemoteIPTrustedProxy 9х.ххх.ххх.х/24;

Save

Restart Apache

# service httpd restart

 

For Debian/Ubuntu + Apache:

Install the required packages

# apt-get install gcc wget apache2-prefork-dev

Download the module source

# wget -O /usr/local/src/mod_remoteip. from https://raw.github.com/ttkzw/mod_remoteip-httpd22/master/mod_remoteip.c

Compile the obtained source

# cd /usr/local/src/

# apxs2 -i -c -n mod_remoteip.so mod_remoteip.c

If apxs2 doesn't work, use apxs.

Create the /etc/httpd/conf.d/mod_remoteip.conf file. 

Example lines that should be added to the file:

Indicates that the remoteip module should be uploaded from this directory

# LoadModule remoteip_module modules/mod_remoteip.so

Indicates that the X-Forwarded-For header contains the IP addresses 

# RemoteIPHeader X-Forwarded-For

Indicates that the SkyparkCDN nodes are trusted

# RemoteIPTrustedProxy 9х.ххх.ххх.х/24;

# RemoteIPTrustedProxy 1хх.ххх.ххх.х/24;

# RemoteIPTrustedProxy 9х.ххх.ххх.х/24;

Save changes

Copy the module and restart Apache

# mkdir -p /etc/apache2/modules

# cp /usr/lib/apache2/modules/mod_remoteip.so /etc/apache2/modules/

# service apache2 restart