0

Is there a simple way to determine the LAN and WAN IP address of a connected device?

I frequently need to check the local and external IP addresses of devices, especially mobile devices, but I tend to have to look in more than one place for the information. One regular problem is only being able to determine the IPV4 or IPV6 WAN IP address but not both necessitating two separate lookup operations in addition to the LAN IP lookup.

What I need is a simple piece of code (no particular language preference) that will retrieve the LAN and WAN IPV4 and IPV6 addresses to be stored or displayed as required.

Alternatively, for my Android devices at least, are there any utility apps that can show this information quickly in one place?

2
  • Retrieve from where? For which OS? The reason for two separate lookups is that the addresses exist in two very separate locations; e.g. your local OS is what manages the LAN address but has absolutely no idea about the WAN address. Commented Jan 15, 2023 at 9:53
  • Yes, I'm looking for the OS routines to lookup both LAN and WAN IPv4 and IPv6 addresses and / or an existing shell command or add-on utility which will give the same information. Ideally I need to be able to do this from Android and Linux (Mint / Ubuntu). Commented Feb 22, 2023 at 12:15

0

You must log in to answer this question.

Browse other questions tagged .