---
title: "Comment by Furqan Ashraf on \"Hunting Impossible Travel in Sentinel with KQL\" | Hashnode"
description: "The honesty about VPNs is appreciated, because that's where this query lives or dies. One way to do the tuning without hand-maintaining egress ranges: classify"
url: "https://hashnode.com/posts/hunting-impossible-travel-kql/6aea28788273abae1e60d260/comment/6af57b94b354e8da918b0262"
---

[Discussion](https://hashnode.com/posts/hunting-impossible-travel-kql/6aea28788273abae1e60d260)

Comment [Hunting Impossible Travel in Sentinel with KQL](https://hashnode.com/posts/hunting-impossible-travel-kql/6aea28788273abae1e60d260)

[Furqan Ashraf](https://hashnode.com/@jfreaks)

[Nov 12](https://hashnode.com/posts/hunting-impossible-travel-kql/6aea28788273abae1e60d260/comment/6af57b94b354e8da918b0262)

The honesty about VPNs is appreciated, because that's where this query lives or dies. One way to do the tuning without hand-maintaining egress ranges: classify the IPs instead of the users.

Add `IPAddress` to the projection and `PrevIP = prev(IPAddress)`, then join both ends of each pair against a lookup table with columns like `is_vpn`, `vpn_provider`, `is_corporate_gateway` and `is_cloud`. The decision gets more specific than a global exclusion:

-   either side is your own VPN or a known corporate gateway → suppress
-   either side is a commercial VPN → keep, lower severity, show the provider name in the alert
-   either side is a cloud/hosting IP → raise severity, since people rarely sign in to Entra from a VPS on purpose

The table can be a watchlist refreshed daily from whatever IP intelligence you have. We produce this kind of data at [IPGeolocation.io](https://ipgeolocation.io/documentation/ip-security-api.html) (I work there): the security endpoint returns those flags plus `vpn_last_seen`, and bulk takes up to 50,000 IPs per call, enough for a day of distinct sign-in IPs in most tenants. It's paid, so if budget is tight, start with your own egress list and named locations.

One catch either way: label the IP when the sign-in happens, not when the analyst opens the incident. VPN exits get reassigned, and next month's classification can be wrong for this week.

[Alan Conlon](https://hashnode.com/@alanconlon)

[Nov 13](https://hashnode.com/posts/hunting-impossible-travel-kql/6aea28788273abae1e60d260/comment/6af57b94b354e8da918b0262#reply-6af700cfcc91786c5668f2d5)

Thanks, that's a really good refinement. Classifying both ends of the pair rather than excluding users keeps the detection useful on VPN-heavy tenants, and putting the provider name in the alert makes triage much quicker. I should fold this into a future follow-up post.

[Furqan Ashraf](https://hashnode.com/@jfreaks)

[Nov 18](https://hashnode.com/posts/hunting-impossible-travel-kql/6aea28788273abae1e60d260/comment/6af57b94b354e8da918b0262#reply-6afd973f92457d9ac3d3fb8a)

Glad it was useful, Alan, and looking forward to the follow-up post. If you end up trying the IPGeolocation.io security endpoint for the watchlist, feel free to reach out. I'd be happy to help with the setup or the KQL join.
