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

Get external IP with CLI

curl ifconfig.me

For more options: http://ifconfig.me

10 Responses
Add your response

1052

A new addition to my .bash_aliases ;)

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

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

over 1 year ago ·
1460

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

over 1 year ago ·
1702

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

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

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

Any idea?

over 1 year ago ·
5362

@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

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 ·