Verifying Real Client IPs

The following steps list a method to verify your Cachewall installation is correcting HTTP client (visitor) IP addresses. These steps simply outline how to check IPs logged in cPanel's domlog files. If you're not using cPanel, you can use the same procedure with your backend's request logs.

For this example we'll use the website domain.com, assume you're using cPanel EasyApache 4, and pretend your IP is 1.1.1.1.

  1. First, find a website domain that's hosted on the local server.

  2. Connect to your server via SSH and tail that domain's domlog file.

    The pathname you'll tail depends on the domain you've chosen and also the version of cPanel's EasyApache used:

    • For EasyApache 3: /usr/local/apache/domlogs/domain.com

    • For EasyApache 4: /etc/apache2/logs/domlogs/domain.com

  3. Run tail with your domain's pathname as follows:

    tail -f /usr/local/apache/domlogs/domain.com
    	
  4. With tail running, load http://domain.com in your web browser. You should see log lines similar to this:

    1.1.1.1 - - [07/Mar/2017:12:33:35 -0500] "GET / HTTP/1.1" 200 - "-" "Mozilla/5.0 .. Chrome/56.0.87"
    1.1.1.1 - - [07/Mar/2017:12:33:37 -0500] "GET /404/path HTTP/1.1" 404 - "-" "Mozilla/5.0 .. Chrome/56.0.87"
    	

    You may need to refresh and/or specify a random path if your URL is cached (i.e.: http://domain.com/404/path)

  5. Take note of the left-most IP shown in the output; this is what the backend sees as the visitor IP.

The IP output for your request should match your own. Check https://ipinfo.io to grab your current IP if needed.

  • If the log IP matches, you're all set. Woohoo!

  • If the log IP belongs to your server, something is wrong in your configuration.

Still need help? Contact Us Contact Us