Was poking around ServerFault this morning and came across a great one-liner command using curl which will tell you the device’s external facing IP address. This probably isn’t anything new but it was something that I just haven’t thought of until now.

curl icanhazip.com

Icanhazip.com is just a simple output of the IP address of the accessor, so it is really clean and simple, just how I like it. It is really easy to set up by yourself if you have a domain not doing anything. In index.php, place:

echo "$ip";


You May Also Like

Linux: Find text in a large number of files

If you need to find a string in a file, you would…

Replacing the Cable Box – Idea Dump

So it’s 4AM, but I woke up with some ideas about replacing…

Development on WSL – Code in Windows, Run on Linux!

With the advent of Windows Subsystem for Linux – or WSL –…

Visual.Syntax is my choice for code highlighting

I am using the Visual.Syntax code highlighting plugin by Matthew Delmarter. There…