Azure App Service - Get Public Client IP (not RFC1918)

Brass Contributor

Hello,

 

I'm currently looking at the "AppServiceHTTPLogs" from an App Service. This App Service is publicly accessible over the internet. When I watch the logs, I'm not able to get the Private IP from the customer, would it be possible somehow to get the IP of the customer accessing my App Service.
At the moment, I only see RFC1918 IPs in the cIP field.

Kind Regards,
Thomas

3 Replies

@thomasdefise 

if you enable application insights on the app level. you will get the client IP and also many other details on your app usage and behavior. 

Hello @sramadugu,

 

First, let me thank you for helping me.
Unfortunately, I'm not able to see the forward those logs towards Azure Sentinel or external SIEM (from what I see),  and I also only see "0.0.0.0" as client_IP.

 

clipboard_image_0.png

 

Kind Regards,

 

Thomas

@thomasdefise 

the default behavior of app insights doesn't capture the IP, but you can follow the below doc to override the default and capture the IP. 

 

https://docs.microsoft.com/en-us/azure/azure-monitor/app/ip-collection