How to Configure SafeLine WAF to Accurately Capture the Real Client IP

When reviewing attack logs in SafeLine WAF, you may notice that the source IPs sometimes seem incorrect. This guide explains why that happens—and how to ensure SafeLine captures the real client IP, especially when deployed behind proxies. Don’t want the full explanation? Jump to the conclusion for a quick fix. ❓ Why IPs Might Look Wrong By default, SafeLine reads the client IP from the socket of the incoming HTTP connection. This works perfectly if SafeLine is deployed as the outermost network device. However, in many production setups, SafeLine sits behind one or more proxies, such as: Nginx CDN providers Load balancers API gateways In these cases, the HTTP connection comes from the proxy, not the actual client. So SafeLine logs the proxy’s IP—not the attacker’s.

May 9, 2025 - 11:07
 0
How to Configure SafeLine WAF to Accurately Capture the Real Client IP

When reviewing attack logs in SafeLine WAF, you may notice that the source IPs sometimes seem incorrect. This guide explains why that happens—and how to ensure SafeLine captures the real client IP, especially when deployed behind proxies.

Don’t want the full explanation? Jump to the conclusion for a quick fix.

❓ Why IPs Might Look Wrong

Image description

By default, SafeLine reads the client IP from the socket of the incoming HTTP connection. This works perfectly if SafeLine is deployed as the outermost network device.

However, in many production setups, SafeLine sits behind one or more proxies, such as:

  • Nginx
  • CDN providers
  • Load balancers
  • API gateways

In these cases, the HTTP connection comes from the proxy, not the actual client. So SafeLine logs the proxy’s IP—not the attacker’s.