How to Record Visitors' True IP Addresses with VergeCloud

How to Record Visitors' True IP Addresses with VergeCloud

Recording True IP Addresses Behind VergeCloud Proxy

VergeCloud employs a reverse proxy approach, meaning the visitor IP addresses displayed in logs often show VergeCloud's IP instead of the actual visitor IPs. To address this, VergeCloud stores the real IP addresses in dedicated HTTP headers, which can be logged using configurations for Nginx, Apache, and IIS.

How to Record Visitors' True IP Addresses in Nginx

To capture the actual IP addresses in Nginx, use the following headers:

log_format test1 ‘… $http_x_real_ip $http_ar_real_ip $http_x_real_ip…’

Configure the log format as follows:

access_log test1;

An example configuration may look like this:


log_format test1 '$http_x_real_ip - $remote_user [$time_local] '
'"$request" $status $body_bytes_sent' 
'"$http_referer" "$http_user_agent "$http_ar_real_ip" "$http_x_real_ip"';

How to Record Visitors' True IP Addresses in Apache

To log the true IP addresses in Apache, include these values in your log format:

"%{X-Forwarded-For} %{X-Real-Ip} %{x-real-ip}i"

A basic log format example in Apache:


LogFormat " %h %l %u %t \"%r\" %>s %b %{X-Forwarded-For} %{X-Real-Ip} %{x-real-ip}i" test1

How to Record Visitors' True IP Addresses in IIS

To log true IP addresses in IIS:

  1. Navigate to: IIS Config > Logging.
  2. Select Select Fields.
  3. Click on Add Field.
  4. Add the following headers:
    • x-real-ip
    • X-Real-Ip
    • X-Forwarded-For

    • Related Articles

    • Advanced HTTP Header-Based Firewall with VergeCloud

      Understanding the Challenge Traditional firewalls focus on IP-based filtering, which can be bypassed by proxy networks, VPNs, and botnets. As attackers evolve, businesses require finer-grained security controls to detect and block threats at the HTTP ...
    • Securing and Optimising WordPress with VergeCloud Edge Protection

      Securing and Optimising WordPress with VergeCloud Edge Protection Keeping your WordPress site secure and fast is critical—especially as online threats and performance demands grow. VergeCloud’s edge-based protection services help you defend your site ...
    • Setting Up Redirect Page Rules on VergeCloud: Guide to Managing Website Redirects

      Redirect Configuration In this section, you can learn how to direct traffic from a specific URL to another within the Page Rules area. To begin, navigate to the Page Rules section of your user panel under the VergeCloud CDN service and select the ...
    • DDoS Mitigation

      VergeCloud DDoS Protection VergeCloud offers robust protection against DDoS attacks, designed in four stages to safeguard your website from malicious intrusions. This guide will help you understand how to implement and manage DDoS protection ...
    • VergeCloud Web Application Firewall (WAF) Penetration Test

      VergeCloud Web Application Firewall (WAF) Penetration Test 1. Cross-Site Scripting (XSS) via cURL Command Used: curl -v "http://example.com/onload=alert("XSS")>" This is a CLI-based variation of the previous test, where a cURL command simulates a ...