> ## Content Index
> Fetch the complete content index at: https://mfitzp.ghost.io/llms.txt
> Use this file to discover other available public pages before exploring further.

# Use ifconfig.me to return your IP and Host
- URL: https://mfitzp.ghost.io/use-ifconfigme-to-return-your-ip-and-host/
- Published: 2011-11-08T00:00:00.000Z
- Updated: 2024-03-28T21:34:37.000Z
- Author: Martin Fitzpatrick
- Tags: Tutorials, #Import 2024-03-14 08:20, #Import 2026-08-24 14:26

ifconfig.me is a web service that displays information about your connection, including IP address, hostname and User Agent string. Helpfully it provides a simplified interface that can be easily queried to get this information from the command line.

All commands are variations on the below. 

```bash
curl ifconfig.me curl ifconfig.me/<request-data>
```

☝️

The full list is also available on the [ifconfig.me website](https://ifconfig.me/?ref=mfitzp.ghost.io)

For example, to get your remote IP address as seen by other users online enter the following at a command line:

```bash
curl ifconfig.me
```

Or

```bash
curl ifconfig.me/ip
```

💡

*`curl`* *is a command-line tool for performing http network requests & retrieving data from a specified address or URL*

Other commands are variations on this theme such as `curl ifconfig.me/host` for your remote hostname, or `curl ifconfig.me/ua` for your User Agent

> *Note that your User Agent will be that as sent by `curl` and will differ from that reported when accessing ifconfig.me in your actual browser.*

A full set of all the data returnable is available using:

```bash
curl ifconfig.me/all
```