Global Request Filter or PreRequest Filter would be the way to go. If you’re making a network call I would be caching the results of IP lookups to prevent subsequent network requests for the same IP’s. In which case I’d probably just use a singleton ConcurrentDictionary<string,bool>
to cache results of IP lookups.