I’ve often used http://ipecho.net to print my current IP, this can be done by curling the following HTTP endpoint
1 2 |
$ curl ipecho.net/plain;echo 101.166.140.132 |
As you can see, I ended the command with an ‘echo’ to print a new line, and only my external IPv4 address was printed.
Now, there is an alternative, with http://checkip.amazonaws.com, and also prints out the local NATed IP. Handy!
1 2 |
$ curl checkip.amazonaws.com 10.1.1.208, 101.166.140.132 |
It’s worth noting that curling the HTTPS endpoint of checkip.amazonaws.com will only print out the external IP
Leave a Reply