# Regional IPs don't seem to be in the correct region

**URL:** <https://community.fly.io/t/regional-ips-dont-seem-to-be-in-the-correct-region/2973>\
**Category:** General\
**Created:** [October 28, 2021, 8:31pm UTC](https://community.fly.io/t/regional-ips-dont-seem-to-be-in-the-correct-region/2973 "2021-10-28T20:31:30Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![dan](https://avatars.discourse-cdn.com/v4/letter/d/eada6e/32.png) [@dan](https://community.fly.io/u/dan)\
**Post date:** [October 28, 2021, 8:31pm UTC](https://community.fly.io/t/regional-ips-dont-seem-to-be-in-the-correct-region/2973/1 "2021-10-28T20:31:31Z")

</div>

Hi! We are looking to move our service over to fly (and have been for a few months), however one thing that I noticed is that IPs that are assigned to my app aren’t in the correct region (even when they are created as “regional” IPs). As an example, I created a “regional” IP for one of my apps in IAD, and it shows the IP as being regional to IAD. However, when I look up that IP in any of the geolocation databases, it shows as being in the Netherlands.

Is there something else I have to do in order to enable that?

Thanks!

---

<div class="post-metadata">

**Author:** ![sudhir.j](https://sea1.discourse-cdn.com/fly1/user_avatar/community.fly.io/sudhir.j/32/39775_2.png) [@sudhir.j](https://community.fly.io/u/sudhir.j)\
**Post date:** [October 28, 2021, 8:40pm UTC](https://community.fly.io/t/regional-ips-dont-seem-to-be-in-the-correct-region/2973/2 "2021-10-28T20:40:17Z")

</div>

When it comes to geolocation databases, they can only guess at where an IP might be pointing to, and they might use different methods to figure out where that might be. The IPs that Fly buys and/or assigns can be routed anywhere in the world, though — and will change locations when they change assignments. If you do a `traceroute` to your IP you’ll see it goes to the region you want it in, but the geolocation database might not have checked recently or updated their database.

---

<div class="post-metadata">

**Author:** ![dan](https://avatars.discourse-cdn.com/v4/letter/d/eada6e/32.png) [@dan](https://community.fly.io/u/dan)\
**Post date:** [October 28, 2021, 8:57pm UTC](https://community.fly.io/t/regional-ips-dont-seem-to-be-in-the-correct-region/2973/3 "2021-10-28T20:57:28Z")

</div>

Interesting. It looks like they usually update every few weeks. I’ll see if they eventually update and get the correct location.

Thanks!

---

<div class="post-metadata">

**Author:** ![kurt](https://sea1.discourse-cdn.com/fly1/user_avatar/community.fly.io/kurt/32/43757_2.png) [@kurt](https://community.fly.io/u/kurt)\
**Post date:** [October 28, 2021, 9:01pm UTC](https://community.fly.io/t/regional-ips-dont-seem-to-be-in-the-correct-region/2973/4 "2021-10-28T21:01:52Z")

</div>

Geo IP databases are very inaccurate for companies like ours. Some of our IPs are registered with [RIPE](https://en.wikipedia.org/wiki/RIPE), and thus default to Amsterdam. The geo IP providers might choose to use our corporate address for those instead, but then they’ll show in either Chicago or Delaware.

Meanwhile, we can put IPs anywhere in the world with a one line config change. We won’t, but the IAD IPs could just as easily be routing to Sydney tomorrow. We could even route it everywhere!

`traceroute` and `mtr` are the only real way to see where a given connection is being routed. You can usually see city names and airport codes in the intermediate hops.

IP databases don’t actually try to solve this, they’re mostly interested in identifying consumer locations. The ISP’s business address is often good enough for consumer IPs.

---

<div class="post-metadata">

**Author:** ![dan](https://avatars.discourse-cdn.com/v4/letter/d/eada6e/32.png) [@dan](https://community.fly.io/u/dan)\
**Post date:** [October 28, 2021, 9:17pm UTC](https://community.fly.io/t/regional-ips-dont-seem-to-be-in-the-correct-region/2973/5 "2021-10-28T21:17:22Z")

</div>

ok. thanks! we’ll test to see if that works for us.

---

<div class="post-metadata">

**Author:** ![kurt](https://sea1.discourse-cdn.com/fly1/user_avatar/community.fly.io/kurt/32/43757_2.png) [@kurt](https://community.fly.io/u/kurt)\
**Post date:** [October 28, 2021, 9:19pm UTC](https://community.fly.io/t/regional-ips-dont-seem-to-be-in-the-correct-region/2973/6 "2021-10-28T21:19:36Z")

</div>

Out of curiosity, what are you using regional IPs for?

---

<div class="post-metadata">

**Author:** ![dan](https://avatars.discourse-cdn.com/v4/letter/d/eada6e/32.png) [@dan](https://community.fly.io/u/dan)\
**Post date:** [October 29, 2021, 2:31pm UTC](https://community.fly.io/t/regional-ips-dont-seem-to-be-in-the-correct-region/2973/7 "2021-10-29T14:31:05Z")

</div>

We are a B2B service, and many of our customers are very sensitive to regional data fencing. In this case it’s really about the optics, but if the IPs look like they are in the wrong country it doesn’t look good for us.

---

<div class="post-metadata">

**Author:** ![kurt](https://sea1.discourse-cdn.com/fly1/user_avatar/community.fly.io/kurt/32/43757_2.png) [@kurt](https://community.fly.io/u/kurt)\
**Post date:** [October 29, 2021, 2:44pm UTC](https://community.fly.io/t/regional-ips-dont-seem-to-be-in-the-correct-region/2973/8 "2021-10-29T14:44:35Z")

</div>

If your customers warrant a lot of extra cost, we can announce IPs you own. You could get a /24, assign it to an entity with an address where you want it, and the geoip databases should do what you want. So it’s fixable, at least.

---

<div class="post-metadata">

**Author:** ![dan](https://avatars.discourse-cdn.com/v4/letter/d/eada6e/32.png) [@dan](https://community.fly.io/u/dan)\
**Post date:** [October 29, 2021, 3:56pm UTC](https://community.fly.io/t/regional-ips-dont-seem-to-be-in-the-correct-region/2973/9 "2021-10-29T15:56:16Z")

</div>

hm. could you do the same for IPv6 addresses? What would the additional cost be (approximately - I just need an order of magnitude).

Also, my understanding is that I’m hitting gateway IP addresses. However, from a previous post it seems like I can add something like:

```auto
[experimental]
allowed_public_ports = [5000]

```

to get to the IP of my actual instance?

Thanks!
