Report this

What is the reason for this report?

Client IP on App Platform

Posted on October 19, 2021
Kas

By Kas

Hi,

Firstly thanks for all the great community resources here 👍

I’ve been testing out the App Platform with a Docker container that hosts an Apache server. I was wondering what would be the correct way to configure it such that it reports the correct client IP as opposed to the load balancer IPs (I’m assuming that’s the IP I’m seeing)?

I read through this related question which was really useful.

From a quick test, I can see the X-Forwarded-For and DO-Connecting-IP are populated in the headers and contain the client IP.

Setting RemoteIPHeader X-Forwarded-For on it’s own doesn’t do the trick sadly. Reading further through the docs of mode_remoteip it seems in order for this work a list of trusted proxy IP addresses is needed.

e.g. RemoteIPTrustedProxy 141.101.64.0/18

Is there a stable set hostnames or IP ranges that can be used? Is there perhaps a more correct way of achieving this on App Platform?

Thanks!

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Start building today

From GPU-powered inference and Kubernetes to managed databases and storage, get everything you need to build, scale, and deploy intelligent applications.