-t2lwa
Last Updated: February 25, 2016
·
3.091K
· zonetti
F46c21deea19955ae03c8f28aa6b9f99

Get external IP with CLI

curl ifconfig.me

For more options: http://ifconfig.me

Say Thanks
Respond

10 Responses
Add your response

1052
 body onload alert 1

A new addition to my .bash_aliases ;)

alias myip='curl ifconfig.me'
over 1 year ago ·
1454
945258270639ca5c60f7bc5b778b3319

dig +short myip.opendns.com @resolver1.opendns.com

over 1 year ago ·
1460
4a0730aa0046250765c6f252bd6efe00

If you speak JSON then http://httpbin.org

over 1 year ago ·
1702
Ea20769072a6038d72fba0cc2806b479

For just the IP I prefer http://icanhazip.com ;)

over 1 year ago ·
2779

For json output: curl ifconfig.me/all.json

over 1 year ago ·
4735
43ea08b4fc547e8a5da87c207bea2123

Better yet use ...

curl http://ifconfig.me/ip
over 1 year ago ·
5076

Does not work for me , neither
curl ifconfig.me
nor
curl http://www.ifconfig.me
work

over 1 year ago ·
5361
Me

curl ifconfig.me
curl: (52) Empty reply from server

Any idea?

over 1 year ago ·
5362
F46c21deea19955ae03c8f28aa6b9f99

@mrahma01 It's probably some problem in your network: http://stackoverflow.com/questions/1924434/curl-error-52-empty-reply-from-server

over 1 year ago ·
5695
Big pimpin

Had to share this:
So I curl'd to one of my servers (forgetting what I had set as the index file) and it simply replied with meh

First thought: Did my own server just refuse to tell me something???

And that's the story of how I trolled myself

over 1 year ago ·
Filed Under