$RemoteIPAddress not working in Dashboard

@Support @adam

Am I doing something wrong?

$RemoteIPAddress does not seem to be working as I would expect it to.
I tried from two different machines and getting the same response, along with IPv6.

::ffff:10.123.12.1
Product: PowerShell Universal
Version: 3.2.3

I checked with our networking team, and found out that is the IP address of our load balancer. So, they enabled the http_x_forwarded_for to the header to display the client IP Address that way.

I got it, it is displayed as: $($Headers.‘X-Forwarded-For’).
Not sure if possible to enable a switch that we are using a load balancer, to populate the $RemoteIpAddress from the header, but this solves my issue.

I was just about to post the same question. I am getting only ::1 as a response using the simple code below:

New-UDDashboard -Title 'Home' -Content {
    New-UDTypography -Text $RemoteIPAddress
}

I’ll make sure we get the header forwarding extension installed: http - ASP.NET Core: How to get remote IP address? - Stack Overflow

I’ll have to see why both IP types are ending up in the remote IP address variable.

1 Like