Ident.me makes life easy!
Ratan Mohapatra
Technical Architect | Multi-Cloud Solutions (AWS | Azure | OCI) | IAM (Active Directory | EntraID) & Network Security Specialist | IaC Automation (Terraform, PowerShell, Python)
One of my network simulation exercises is to create site-to-site VPN tunnels- IPSec and Wireguard -to cloud lab networks and playing with their optimization.
I built a script that connects to all my networks and save the data in a log file for analysis. But when I ran it in different networks and compiled the data, I had no way to know where they were from. Therefore I was looking for a way to add the Gateway information to identify them.
Ident.me is a cool way I learnt! Just type that on a web browser and you get the public IP (Fig.1)!
I do my scripts in PowerShell where it was easy to integrate with Invoke-WebRequest.
#get my Gateway Info:
$myPublicIP = '???'
try{
$myPublicIP = $(Invoke-WebRequest -Uri 'https://ident.me').content
}
catch{}
$ProtectedNetwork = '192.168.123.0/24'
$GatewayInfo = "My Gateway Public IP:{0} Encryption Domain = {1}" -f $myPublicIP, $ProtectedNetwork
Below is an output from my connectivity script in PowerShell
Feel free to share in the comments your favourite solutions.