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: Daniel Stenberg via curl-users <curl-users_at_lists.haxx.se>
Date: Sun, 2 Jan 2022 12:54:58 +0100 (CET)

On Sun, 2 Jan 2022, Turritopsis Dohrnii Teo En Ming via curl-users wrote:

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

curl cannot show you that. In fact, your "Linux server" on your LAN usually
doesn't have any "public address" at all. You typically go through a
NAT/router to the Internet and that NAT will give you a public address while
in use, and that public address can be shown by services online such as:

  "curl ip.me"

This not really curl showing the address though. It just shows you the content
that remote service returns.

-- 
  / daniel.haxx.se
  | Commercial curl support up to 24x7 is available!
  | Private help, bug fixes, support, ports, new features
  | https://curl.se/support.html
-- 
Unsubscribe: https://lists.haxx.se/listinfo/curl-users
Etiquette:   https://curl.haxx.se/mail/etiquette.html
Received on 2022-01-02