You could deploy a script to write it to a registry key, then set up LS on-prem to scan the registry key... something like this:
$publicIP = Invoke-RestMethod -Uri "https://api.ipify.org"
$regPath = "HKLM:\SOFTWARE\MyCompany\NetworkInfo"
# Create the registry key if it doesn't exist
If (-not (Test-Path $regPath)) {
New-Item -Path $regPath -Force | Out-Null
}
# Store the public IP
Set-ItemProperty -Path $regPath -Name "PublicIP" -Value $publicIP