# Public IP address

**URL:** https://hub.mender.io/t/public-ip-address/5209
**Category:** General Discussions
**Created:** [August 24, 2022, 5:04pm UTC](https://hub.mender.io/t/public-ip-address/5209 "2022-08-24T17:04:17Z")
**Posts on this page:** 12
**Page:** 1

<div class="post-metadata">

### Author: ![emilm](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/emilm/32/449_2.png) [@emilm](https://hub.mender.io/u/emilm)
#### Post date: [August 24, 2022, 5:04pm UTC](https://hub.mender.io/t/public-ip-address/5209/1 "2022-08-24T17:04:17Z")

</div>

Hello! Is this somehow stored somewhere in the mender server? I would like to get the external / public IP of the device.

Thanks!

---

<div class="post-metadata">

### Author: ![oleorhagen](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/oleorhagen/32/297_2.png) [@oleorhagen](https://hub.mender.io/u/oleorhagen)
#### Post date: [August 25, 2022, 5:47am UTC](https://hub.mender.io/t/public-ip-address/5209/2 "2022-08-25T05:47:23Z")

</div>

Hi 😄

By default, a few of these should show up in your inventory.

There is the `geo-ip`, which checks the external IP location. You also have your network interfaces show up (for me `wlan0` and `eth0`), but if you’re behind `NAT` as you know, these are not really that helpful).

---

<div class="post-metadata">

### Author: ![emilm](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/emilm/32/449_2.png) [@emilm](https://hub.mender.io/u/emilm)
#### Post date: [November 7, 2022, 10:59am UTC](https://hub.mender.io/t/public-ip-address/5209/3 "2022-11-07T10:59:47Z")

</div>

Thank you! Sorry for the late reply.  
Where is “geo-ip” ? I can’t see it in inventory. Does it have to be enabled?

---

<div class="post-metadata">

### Author: ![oleorhagen](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/oleorhagen/32/297_2.png) [@oleorhagen](https://hub.mender.io/u/oleorhagen)
#### Post date: [November 7, 2022, 11:42am UTC](https://hub.mender.io/t/public-ip-address/5209/4 "2022-11-07T11:42:26Z")

</div>

The `geo-ip` is just returned from a local inventory script found in `/usr/share/mender/inventory/`.

If this folder contains `mender-inventory-geo`, then you should be good (It was added sometime around `3.0` I think [from the top of my head]).

If not, you can also just add it yourself, there’s not that much too it. It curls a network IP service, and returns the result to the Mender client 😸

---

<div class="post-metadata">

### Author: ![emilm](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/emilm/32/449_2.png) [@emilm](https://hub.mender.io/u/emilm)
#### Post date: [November 7, 2022, 11:59am UTC](https://hub.mender.io/t/public-ip-address/5209/5 "2022-11-07T11:59:34Z")

</div>

Thanks a lot for the quick answer!

I look at [Inventory | Mender documentation](https://docs.mender.io/client-installation/inventory)  
However it seems like it just retrieves information from a 3rd party site [https://ipvigilante.com](https://ipvigilante.com) .  
This is not optimal since I only want to rely on the mender server itself.  
There is no such built-in feature?

---

<div class="post-metadata">

### Author: ![oleorhagen](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/oleorhagen/32/297_2.png) [@oleorhagen](https://hub.mender.io/u/oleorhagen)
#### Post date: [November 7, 2022, 2:39pm UTC](https://hub.mender.io/t/public-ip-address/5209/6 "2022-11-07T14:39:44Z")

</div>

Oh… Now I see what you mean!

> However it seems like it just retrieves information from a 3rd party site [https://ipvigilante.com](https://ipvigilante.com) .

This is correct.

> This is not optimal since I only want to rely on the mender server itself.  
> There is no such built-in feature?

No, there is no such functionality in our server. I’m guessing (from my limited backend experience), that it will not be added either, as it will not scale well with a large number of devices (which we have).

However, if you find some other way of obtaining it from the client, you are free to create your own `inventory` script for it.

If you are essentially running a `whitelist` for your external requests, then hmm…

I guess, you would sort of want an endpoint like `ipvigilante` on the Server, for the client to poll. This would actually work (as opposed to storing it from the request).

However, there are no immediate plans in the works for this, as it’s a rarely (first time this) requested feature. But if the community wants it enough… Who knows 😺

---

<div class="post-metadata">

### Author: ![emilm](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/emilm/32/449_2.png) [@emilm](https://hub.mender.io/u/emilm)
#### Post date: [November 7, 2022, 2:55pm UTC](https://hub.mender.io/t/public-ip-address/5209/7 "2022-11-07T14:55:22Z")

</div>

Thank you for clarifying this!  
Maybe it could be an option on self hosted?  
I think we’ll just have a simple endpoint on our own server meanwhile.

Thanks again!

---

<div class="post-metadata">

### Author: ![oleorhagen](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/oleorhagen/32/297_2.png) [@oleorhagen](https://hub.mender.io/u/oleorhagen)
#### Post date: [November 8, 2022, 1:25pm UTC](https://hub.mender.io/t/public-ip-address/5209/8 "2022-11-08T13:25:33Z")

</div>

> Maybe it could be an option on self hosted?

Nothing keeping you from adding this on a self-hosted instance 🙂

> I think we’ll just have a simple endpoint on our own server meanwhile.

Should work just fine 😸

And best of luck!

Also, will you mark the thread as resolved? 🙏

---

<div class="post-metadata">

### Author: ![emilm](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/emilm/32/449_2.png) [@emilm](https://hub.mender.io/u/emilm)
#### Post date: [November 8, 2022, 1:43pm UTC](https://hub.mender.io/t/public-ip-address/5209/9 "2022-11-08T13:43:25Z")

</div>

> [@oleorhagen](#):
>
> Also, will you mark the thread as resolved? 🙏

Thanks for all the help. How do I mark it as resolved? I see no function for that in the … menu

---

<div class="post-metadata">

### Author: ![TheYoctoJester](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/theyoctojester/32/1444_2.png) [@TheYoctoJester](https://hub.mender.io/u/TheYoctoJester)
#### Post date: [November 8, 2022, 2:22pm UTC](https://hub.mender.io/t/public-ip-address/5209/10 "2022-11-08T14:22:46Z")

</div>

@emilm you can mark a post as solution, its near the bottom - click the three dots to unfold and click the “Solution” checkbox.

Greetz,  
Josef

---

<div class="post-metadata">

### Author: ![oleorhagen](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/oleorhagen/32/297_2.png) [@oleorhagen](https://hub.mender.io/u/oleorhagen)
#### Post date: [November 8, 2022, 2:24pm UTC](https://hub.mender.io/t/public-ip-address/5209/11 "2022-11-08T14:24:58Z")

</div>

> How do I mark it as resolved?

You just made us realise this was not enabled in the get-started section - thanks. Option should be there now 😸

---

<div class="post-metadata">

### Author: ![emilm](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/emilm/32/449_2.png) [@emilm](https://hub.mender.io/u/emilm)
#### Post date: [November 8, 2022, 2:34pm UTC](https://hub.mender.io/t/public-ip-address/5209/12 "2022-11-08T14:34:57Z")

</div>

Great, I have now marked it as solution 🙂
