Issue
The internal IP address of the load balancer or proxy is displayed in domain logs (Domains > example.com > Logs) instead of the client's IP (real visitor's IP).
Environment
- Plesk
- Apache with Nginx
- Imunify360 can be blamed for the issue
- Cloudflare
Solution
Go to Domains > example.com > Apache & Nginx Settings and add the following content to the Additional Nginx directives, for Cloudflare use:
set_real_ip_from 127.0.0.0/8;
real_ip_header X-Forwarded-For;
On cPanel t should be enough to have
Cause
Proxies and load balancers rewrite the origin IP address and specify the client's IP address in an additional HTTP header.
Useful links
- https://support.plesk.com/hc/en-us/articles/360025828373
- https://cloudlinux.zendesk.com/hc/en-us/articles/4411801942802-Wrong-IP-detection
- https://cloudlinux.zendesk.com/hc/en-us/articles/4411949215634-Imunify360-Server-s-interface-IP-matched-as-attackers-ip
Comments
0 comments
Please sign in to leave a comment.