curl / Mailing Lists / curl-library / Single Mail


Re: Primary IP

From: Daniel Stenberg <>
Date: Wed, 22 Mar 2017 13:05:09 +0100 (CET)

On Wed, 22 Mar 2017, Michael via curl-library wrote:

> Thanks. This returns the provider server ip (dns?)

It returns the specific destination IP address libcurl used to perform the

> and local_ip the reserved ip to communicate with my modem.

IP packets only have two IP addresses. The source and the destination. libcurl
can return both for you.

> No other options to show the same as for ex.

If the local address is different in a remote place compared to what it is
when libcurl sends out packets, then something has changed that address along
the way. A so called Network Address Trnaslator, or NAT for short. libcurl has
no knowledge of that and it can't tell you info from that translation since it
never sees that other address, only the remote server does.

Received on 2017-03-22