Search notes:

Internet Protocol

Determining own IP address

Windows

In Windows, the IP address can be determined with a combination of ipconfig.exe and findstr.exe.
The PowerShell script ip.ps1 prints IP addresses of local non-loopback adapters.

Linux

dig +short myip.opendns.com @resolver1.opendns.com
Yet, this approach does not seem to work behind NAT.

Virtual machine

One of the following to commands should report the public IP address if executed in a virtual machine.
$ curl ipconfig.me
$ curl ipconfig.me/ip
Sometimes, it's necessary to get the IP4 address:
$ curl -4 ipconfig.me/ip

IPv6

See also Linux networking IPv6

Index