
The article discusses the methods of mapping network interfaces by IP address using the Binance crypto exchange API service as an example. Geo-positioning is based on distance-time models for converting round-trip time (RTT) to a distance and determining the approximate location of the network interface.
It is very important for modern electronic services to know about the geographical location of customers for the "fine" settings of their marketing processes. Different techniques of users' location are widely used, based on binding to mobile base stations and Wi-Fi access points . However, there are a number of other tasks for the solution of which it is necessary to know the geolocation not of the user himself, but of the server and its network interface. Services such as MaxMind (the undisputed industry leader) are widely known to the public (you can also read here), but on the whole, there is little open-source material on the technological issues of the global host location by its IP address. In this article, we will talk about some solutions in this subject area and share the results of our research.
Follow the details under cat.
Why know the server geolocation?
: , , . , , . , . , Binance Bitfinex Bitcoin (BTC) . , BTC . , - . .
( ) ( ) . , , , . , , .
– .
, DNS . , 2001 . Constraint-based geolocation (CBG), (RTT) echo-request ICMP ( landmarks ) . , 2/3 , RTT ICMP- landmark- . landmark-, . 100 . CBG :

CBG
- CBG , . «» . , RTT, – landmark- , . CBG IP-: Shortest ping, Topology-based geolocation (TBG), Octant, Street-level geolocation (SLG). , ( ). , , RTT. . , IP- - .
landmark- , MaxMind . IP- /24 (IPv4) . RIPE NCC . Atlas – RIPE NCC, 10 000 ( 2020 ) . - .
?
IP- . . , , . , , . , .
- . 42 VPS- - , - , ICMP echo request, RIPE.Atlas, DNS. , . , constraint-based .
MSK-IX. ( looking glass, DNS, , .). .
– Binance, . .
Binance
Binance 2017 , 2019 53 %. . , , - , ( ). . - . , .
1. Binance API- api.binance.com. . DNS :
, Binance CDN- (content distribution network). Amazon, . CDN- Name- Amazon CNAME d3h36i1mno13q3.cloudfront.net DNS. , DNS- 25 . , IP- AS16509 AMAZON 02. IP- PTR-, Amazon:
IP- Amazon AWS.
Binance CDN- : ( , ), / -, Amazon. API- Binance IP- , DNS. RIPE NCC «Binance» – .
API- . , , API- . CDN API- , API .
1:
- api.binance.com CDN Amazon.
- API- , CND, .
- Binance, , , -.
2. API- Binance. , IP- . RTT . , . .
CDN HTTP(S)- . API- CDN- RTT echo-request ICMP , RTT CDN- API- Binance:

. CND-, CND-, API- Binance. , , Shortest ping .
API- 400 . - Binance - . Binance API-. .
3. API- Binance
. – , . IP, , , API- Binance. IP . MaxMind CSV , Latitude, Longitude Accuracy_radius . , IP- , BGP. BGP- RIPEstat Data API.
, RIPE NCC BGP (IX-Internet Exchange), . BGP 5 . , , .
IP, , : 1 130 496 IPv4. :
- DNS PTR , - «Binance». , API-.
- Binance API- Test connectivity GET /api/v3/ping ( API Binance) . , CDN Amazon. : . IP- .
API- Binance, -, «» . - -, . . Binance Amazon.
4. API- Binance
: , . RTT . . , , ICMP echo-request. HTTPS. ( ) , - . , . 50 . API-, , API- 80 .
- . TCP-, . , .
IP- . . ? , .
- GPS
- Web-
- - MSK-IX
- Constraint-Based Geolocation of Internet Hosts, Bamba Gueye, Artur Ziviani, Mark Crovella, Serge Fdida
- Revisiting Constraint Based Geo Location: Improving Accuracy through Removal of Outliers, Sameer Qazi and Muhammad Kadri
- A landmark calibration-based IP geolocation approach, Jingning Chen, Fenlin Liu1, Xiangyang Luo, Fan Zhao and Guang Zhu1
- Towards IP Geolocation Using Delay and Topology Measurements, Ethan Katz-Bassett, John P. John, Arvind Krishnamurthy, David Wetherall, Thomas Anderson, Yatin Chawathe
- An investigation of geographic mapping techniques for internet hosts, V. Padmanabhan and L. Subramanian, in ACM SIGCOMM Computer Communication Review, vol. 31. ACM, 2001, pp. 173–185
- RIPE NCC Atlas network
- Review of Different IP Geolocation Methods and Concepts Jayaprabha Bendale, Prof. J. Ratanaraj Kumar G.S.Moze College of Engineering, Balewadi, Pune-45. University Of Pune, Pune, India
- B. Wong, I. Stoyanov, E.G. Sirer, Octant: a comprehensive framework for the geolocation of Internet hosts, proceedings of USENIX NSDI conference, 2007, pp. 23–36
- Y. Wang, D. Burgener, M. Flores, A. Kuzmanovic, C. Huang, Towards street-level client-independent IP geolocation, proceedings of the 8th USENIX conference on networked systems design and implementation, 2011, pp. 27–36
- Detect Online Fraud and Locate Online Visitors
- AWS docs
- GeoIP2 City and Country CSV Databases
- RIPEstat Data API
- RIS Raw Data
- binance-official-api-docs

Raccoon Security – «» , , , .