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: Hans Henrik Bergan via curl-users <curl-users_at_lists.haxx.se>
Date: Sun, 23 Jan 2022 16:20:41 +0100

i maintain ip.loltek.net and ip4.loltek.net
(where ip.loltek.net support both ipv6 and ipv4, while ip4 support only
ipv4 and isn't reachable over ipv6, httpS is optional and certificate is
provided by LetsEncrypt)

On Sat, 22 Jan 2022 at 11:30, 林博仁Buo-ren, Lin via curl-users <
curl-users_at_lists.haxx.se> wrote:

> My favorites:
>
> * `curl https://ipinfo.io/json` <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
>


-- 
Unsubscribe: https://lists.haxx.se/listinfo/curl-users
Etiquette:   https://curl.haxx.se/mail/etiquette.html
Received on 2022-01-23