Geolocation is not resolved on some devices #1307

Closed
opened 2025-11-20 05:27:54 -05:00 by saavagebueno · 8 comments
Owner

Originally created by @collse on GitHub (Oct 2, 2024).

Describe the problem

I have a few devices which are all residing on the same network, out of them only 1 resolves to the location geolocation the remaining devices show as "unknown" region. They are also part of the same group.

The device that is properly identified is an iOS 18.0 device with v028.7.
The other devices are a variety of linux flavours (all 0.29.4), iOS 18.0 tablet (v0.28.7) as well as apple devices on Ventura, Sequoia (0.29.4)

To Reproduce

good question

Expected behavior

Geolocation to resolve or allowing to manually add for known devices.

Are you using NetBird Cloud?

Self-host NetBird's control plane - latest

NetBird version

netbird version
0.29.4

NetBird status -dA output:

N/A

Do you face any (non-mobile) client issues?

happens on mobile as well as other devices as stated

Screenshots

image **Additional context**

the workload in France is on a public IP, I have tried enabling airplane mode and re-adding the phone, geolocation still got resolved after a period of time. All of the non-resolved devices reside on the same network, maybe on another VLAN as the iOS device that resolves - at least 2 devices are on the exact same network.

obviously this prevents access control policies in combination with location to work correctly.

Originally created by @collse on GitHub (Oct 2, 2024). **Describe the problem** I have a few devices which are all residing on the same network, out of them only 1 resolves to the location geolocation the remaining devices show as "unknown" region. They are also part of the same group. The device that is properly identified is an iOS 18.0 device with v028.7. The other devices are a variety of linux flavours (all 0.29.4), iOS 18.0 tablet (v0.28.7) as well as apple devices on Ventura, Sequoia (0.29.4) **To Reproduce** good question **Expected behavior** Geolocation to resolve or allowing to manually add for known devices. **Are you using NetBird Cloud?** Self-host NetBird's control plane - latest **NetBird version** netbird version 0.29.4 **NetBird status -dA output:** N/A **Do you face any (non-mobile) client issues?** happens on mobile as well as other devices as stated **Screenshots** <img width="1401" alt="image" src="https://github.com/user-attachments/assets/7a5773dd-916f-4b5d-a84f-6d74e35d3609"> **Additional context** the workload in France is on a public IP, I have tried enabling airplane mode and re-adding the phone, geolocation still got resolved after a period of time. All of the non-resolved devices reside on the same network, maybe on another VLAN as the iOS device that resolves - at least 2 devices are on the exact same network. obviously this prevents access control policies in combination with location to work correctly.
saavagebueno added the waiting-feedbackself-hosting labels 2025-11-20 05:27:54 -05:00
Author
Owner

@collse commented on GitHub (Oct 6, 2024):

I did some further digging on this and it shows, the phone has the actual public.P of my firewall, while the other devices on the same network have either their internal.IP or the firewalls internal.IP which seems odd as all devices are NAT'd at the firewall

the question as such is, what mechanism is used netbird internally to derive the public.ip

@collse commented on GitHub (Oct 6, 2024): I did some further digging on this and it shows, the phone has the actual public.P of my firewall, while the other devices on the same network have either their internal.IP or the firewalls internal.IP which seems odd as all devices are NAT'd at the firewall the question as such is, what mechanism is used netbird internally to derive the public.ip
Author
Owner

@collse commented on GitHub (Nov 4, 2024):

latest versions, issue still exists
image

@collse commented on GitHub (Nov 4, 2024): latest versions, issue still exists ![image](https://github.com/user-attachments/assets/21f95e50-08c8-40b0-8f02-51cfc0cf92a4)
Author
Owner

@mlsmaycon commented on GitHub (Nov 4, 2024):

@collse it seems like your nodes in the same network as the management service are reaching it with the local address. Is common that some firewalls/routers forward traffic directly when one internal node tries to access its public address.

You can confirm that by checking the address listed as Public IP-Address in the peer view.

@mlsmaycon commented on GitHub (Nov 4, 2024): @collse it seems like your nodes in the same network as the management service are reaching it with the local address. Is common that some firewalls/routers forward traffic directly when one internal node tries to access its public address. You can confirm that by checking the address listed as `Public IP-Address` in the peer view.
Author
Owner

@collse commented on GitHub (Nov 4, 2024):

@mlsmaycon thanks for your reply, I have just run a check by using hotspot and it returned the region on connect as well as retained the region when re-connecting via the local wifi. So this could prove your theory. The question then leads to the point, how can I add a device to an access control policy to participate that includes a posture check that includes region if it never retrieves a region? Wouldn't it make sense to allowing this field being specified and updated when it changes?

edit use-case being fully meshed overlay network

@collse commented on GitHub (Nov 4, 2024): @mlsmaycon thanks for your reply, I have just run a check by using hotspot and it returned the region on connect as well as retained the region when re-connecting via the local wifi. So this could prove your theory. The question then leads to the point, how can I add a device to an access control policy to participate that includes a posture check that includes region if it never retrieves a region? Wouldn't it make sense to allowing this field being specified and updated when it changes? **edit** use-case being fully meshed overlay network
Author
Owner

@mlsmaycon commented on GitHub (Nov 4, 2024):

It would fail to match as intended. However, you can work with another policy that allows connections from a private network range for those nodes that match that.

Also, it is possible to disable this behavior on the firewall. You can check your solution's NAT configuration.

@mlsmaycon commented on GitHub (Nov 4, 2024): It would fail to match as intended. However, you can work with another policy that allows connections from a private network range for those nodes that match that. Also, it is possible to disable this behavior on the firewall. You can check your solution's NAT configuration.
Author
Owner

@collse commented on GitHub (Nov 5, 2024):

It would fail to match as intended. However, you can work with another policy that allows connections from a private network range for those nodes that match that.

Also, it is possible to disable this behavior on the firewall. You can check your solution's NAT configuration.

@mlsmaycon I have tried to think this through as my firewall does not allow to change the NAT behaviour and I am unable to verify if it is potentially the proxy, anyhow, my understanding is:

posture checks are evaluated on each member of the access policy:

if I had:

  1. All <--> All - posture checked (netbird version and region (US/GB/FR) as an example

the hosts currently not having a region won't be able to participate in that rule 1)

if I then create a rule 2)
(hosts_without_region) <--> All - posture check (netbird_version, subnet(local_subnets)
wouldn't the members in All who aren't on (local_subnets) be denied to participate?

wouldn't this create a race condition of deny/allow by 2 different rules?

@collse commented on GitHub (Nov 5, 2024): > It would fail to match as intended. However, you can work with another policy that allows connections from a private network range for those nodes that match that. > > Also, it is possible to disable this behavior on the firewall. You can check your solution's NAT configuration. @mlsmaycon I have tried to think this through as my firewall does not allow to change the NAT behaviour and I am unable to verify if it is potentially the proxy, anyhow, my understanding is: posture checks are evaluated on each member of the access policy: if I had: 1) All <--> All - posture checked (netbird version and region (US/GB/FR) as an example the hosts currently not having a region won't be able to participate in that rule 1) if I then create a rule 2) (hosts_without_region) <--> All - posture check (netbird_version, subnet(local_subnets) wouldn't the members in All who aren't on (local_subnets) be denied to participate? wouldn't this create a race condition of deny/allow by 2 different rules?
Author
Owner

@nazarewk commented on GitHub (Apr 28, 2025):

Hello @collse,

We're currently reviewing our open issues and would like to verify if this problem still exists in the latest NetBird version.

Could you please confirm if the issue is still there?

We may close this issue temporarily if we don't hear back from you within 2 weeks, but feel free to reopen it with updated information.

Thanks for your contribution to improving the project!

@nazarewk commented on GitHub (Apr 28, 2025): Hello @collse, We're currently reviewing our open issues and would like to verify if this problem still exists in the [latest NetBird version](https://github.com/netbirdio/netbird/releases). Could you please confirm if the issue is still there? We may close this issue temporarily if we don't hear back from you within **2 weeks**, but feel free to reopen it with updated information. Thanks for your contribution to improving the project!
Author
Owner

@mlsmaycon commented on GitHub (Jun 1, 2025):

closing issue due to no recent feedback. Feel free to open a new one if the issue persist or reopen if this was a feature request.

@mlsmaycon commented on GitHub (Jun 1, 2025): closing issue due to no recent feedback. Feel free to open a new one if the issue persist or reopen if this was a feature request.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: SVI/netbird#1307