I will assume that you have LB environment. SO most probably you getting the LB IP.
If this is the case. you should configure the LB to allow HTTP header transfer to the internal requests. Especially if you use internal HTTP direction across the DMZ.
mainly you can rely on "x-forwarded-for" and the proxy server (LB) will fill that in and pass it to your internal servers.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…