curl / Mailing Lists / curl-users / Single Mail
Buy commercial curl support from WolfSSL. We help you work out your issues, debug your libcurl applications, use the API, port to new platforms, add new features and more. With a team lead by the curl founder himself.

Re: How do I use curl to find out the public IP address of my Linux server within my internal LAN network?

From: 林博仁Buo-ren, Lin via curl-users <curl-users_at_lists.haxx.se>
Date: Sat, 22 Jan 2022 18:29:46 +0800

My favorites:

* `curl https://ipinfo.io/json`
* `curl https://ifconfig.me`
* `curl https://api.myip.com`

Note that some public IP lookup services are not accessible from
certain networks, for example, ipinfo.io is not available to China
while api.myip.com is not available to AWS, you'll likely need to
implement a fallback to deal with such cases.

Cheers,
林博仁(Buo-ren, Lin)
Buo.Ren.Lin_at_gmail.com
-- 
Unsubscribe: https://lists.haxx.se/listinfo/curl-users
Etiquette:   https://curl.haxx.se/mail/etiquette.html
Received on 2022-01-22