Obtenha o endereço IP do host ASP.NET CORE
var httpConnectionFeature = httpContext.Features.Get<IHttpConnectionFeature>();
var localIpAddress = httpConnectionFeature?.LocalIpAddress;
karl-ashraful