cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

This product reached the end of support date on March 31, 2021.

How to get the real user IP via load balancing?

christopher_teb
Organizer

Hi,

Please i would like to get the real user(client) IP but Dynatrace gives me the load balancing server IP as the client IP as the network guys assert me.

All of the above headers are included!

Your kind support is appreciated

Chris

22 REPLIES 22

Babar_Qayyum
DynaMight Leader
DynaMight Leader

Hello Chris,

Which load balancer do you have?

Is X-Forwarded-For configure on your load balancer?

Regards,

Babar

christopher_teb
Organizer

Thanks Babar,

They are using F5 Load balancer.X-forward is disabled as Source address
appearing as LB IP is one of the functionality of LB.

Regards

Chris

Hello Chris,

We had face the same issue with F5 and fixed by enabling the "X-Forwarded-For" header through F5 administrator.

You can also check with the Network/Security guys to enable for sometimes and then verify from your side.

Regards,

Babar

christopher_teb
Organizer

Thanks Babar,

I will check and back to you soon.

Regards,

Chris

christopher_teb
Organizer

Hi Babar,

X-Forwarded-For, was enabled but its still the same issue

Br

Chris

Hello Chris,

Can you confirm which request headers are using to grab the client IP address from the below one?

rproxy_remote_address

True-Client-IP

X-Client-Ip

X-Forwarded-For

X-Http-Client-Ip

Add these values the DT server by going to Settings -> Dynatrace Server Settings -> Geographical Locations -> Determine Client IP using the following HTTP request headers.

Secondly, for tracking the custom unique identifier you would need to add the field to the HTTP headers to be captured. Depending on your technology that could be in Sensor Configuration - Properties of Servlet, Java Web Requests or ASP.NET. Once you have captured it you can then use it in business transactions to group or filter by those values.

https://answers.dynatrace.com/questions/158720/vie...

https://answers.dynatrace.com/questions/95949/view...

https://answers.dynatrace.com/questions/169213/vie...

Regards,

Babar

Thanks Babar,

The settings in the snapshot is the same on my side

Br

Chris

Hello Chris,

What about second option?

Is there any custom unique identifier? If Yes, then add into sensor configuration properties Web Server/Servlet/ASP.NET

Also try one more thing to open the sensor properties of your Web Server/Servlet/ASP.NET to configure the 'Cookie'.

Regards,

Babar

Thanks Babar,

Just like in the snapshot have attached?

cook.jpg

Br

Chris

Hello Chris,

As @Dave M. in another post "Once you are capturing the header, you can click on the top node (usually) in the PurePath that has the appropriate API and select details to the see the Request Header with the name "cookie" and make sure it has some "dt" cookies in it."

Did you check with the application team about any custom unique identifier?

Regards,

Babar

arihant_polavar
Dynatrace Pro
Dynatrace Pro

We had a similar issue at my client site and we use F5 for load balancing too. We actually ended up using the "X-INF-Forwarded-For" header and that worked for us. Do you have a similar header?

In addition, the order of the headers in the Server Settings also matter too. If you think that the 'X-Forwarded-For" header is the one that works, I would bump it to the top and see if that makes any difference.

Thanks,

Ari

dave_mauney
Dynatrace Champion
Dynatrace Champion

Actually, for this one you should add a Request Header for each of the headers:

rproxy_remote_address

True-Client-IP

X-Client-Ip

X-Forwarded-For

X-Http-Client-Ip

And see which one(s), if any, are being passed.

So instead of "Cookie", use each of the names listed above.

You can check the top node (usually, check the API column) to see if the Request Header section has one of the headers of interest or not.

HTH,

dave

christopher_teb
Organizer

Hi Babar,

Those are what i have as Request Headers and also include "dt" in the snapshot below

cook.jpg

And per now am able to see the public IPs and at times see the load balancer IPs!

What should i do next??

Br,

Chris

Hello Chris,

This is a good news that you are able to see the public IP Addresses.

When do you see the LB IP and for how many visits and what is the origin of those visits.

Regards,

Babar

Hi Babar,

Its 50% by each side because sometime see public and at time again the load balancer IPs

The origin is from Africa-Uganda.Should we enable this(

X-INF-Forwarded-For

) also or we should enable one from the load balancer?

I have attached the snapshot on the number of headers i receive now

cook.jpg

Br,

Chris

Babar_Qayyum
DynaMight Leader
DynaMight Leader

Hello Chris,

I can see in the screenshots that 'X-Forward-For' is capturing the IP Address.

Is this number one in the priority in sever settings?

You can try the 'X-INF-Forwaded-For' on the router side and also include in the sever settings as priority one.

We can also exclude the LB IP in the User Experience to check the impact.

Regards,

Babar

Thanks Babar,

Yes i put 'X-Forward-For' as the first priority as the below snapshot

cook.jpg

How to exclude the LB IP in the User Experience?

Br,

Chris

Hello Chris,

Edit System Profile > User Experience > Default Application OR (Your Manual Created Application) > Expand the Web Application Portion > Advanced Configuration and then you can find the location to exclude the IP.

IP exclude along with the subnet mask, so just make sure to put the correct mas e.g. 1.2.3.4/8

AppMon captures the client IP address. For CDNs and load balancers, AppMon watches for the appropriate HTTP headers and converts this IP address to a geo location with a built in database. The IP address is determined as follows:


  1. http-requestheader field "rproxy_remote_address"
  2. http-requestheader field "True-Client-IP"
  3. http-requestheader field "X-Client-Ip"
  4. http-requestheader field "X-Forwarded-For"
  5. http-requestheader field "X-Http-Client-Ip"
  6. ip-address of requester

https://community.dynatrace.com/community/display/...

Geographical Locations - Mapping of IP Addresses

If you use AppMon to monitor intranet applications, your visitors may have private IP addresses. It is impossible to determine the location of these IP addresses. As a result, features, such as grouping visits by location, are available in this scenario. To exploit the advantages of User Experience Management, map the private IP address ranges to the locations where these ranges are used.

https://community.dynatrace.com/community/display/...

Regards,

Babar

Hi Babar,

I excluded the LB IP's and are no longer seen but wont affect the number of users visited? Ok what is its impact?

Br,

Chris

Hello Chris,

After removed the LB IP, can you see the visits from Africa-Uganda?

Did you try to configure or double check the information from my last comments?

Regards,

Babar

christopher_teb
Organizer

Thanks Babar,

Yes i see those visits from Africa-Uganda but with public IP's!

I double checked and configured as in the below snapshot

cook.jpg

Br,

Chris

Hello Chris,

Good News !!!

Then you should be OK with your collected visits information.

Regards,

Babaar