ݺߣ

ݺߣShare a Scribd company logo
1
Geolocation
and
Geofeed Implementation
Subha Shamarukh
Internet Resource Analyst
APNIC
2
What is Geolocation?
• IP geolocation is the mapping of an IP address to a
geographic location (using databases and other data
sources).
3
3
Why do we need Geolocation?
• Location-Based Services
• Targeted Advertising and Marketing
• Enhanced User Experience
• Compliance with Legal and Regulatory Requirements
• Fraud Detection and Prevention
• Emergency Services and Public Safety
4
4
Ecosystem
5
5
IP Geolocation complaints are on the rise
• APNIC has exhausted fresh 103 prefixes from final /8 block.
• New addresses delegated are from recycled pool.
• These IPs were in use before, so some geolocation
providers may point to the old geolocation details.
6
6
Queries from APNIC members
My customers cannot access Bkash,
Rocket app with these IPs. Please
help.
Currently, we are getting our IP geolocation
Australia. Please change our IP geolocation from
Australia to Pakistan.
We are getting geolocation issue in our IP. It
shows Italy but we serve in Bangladesh. So how
can I solve the issue?
Services hosted in amazon web services
detects the IP as Hong Kong Country IP.
So a lot of our users are not being able to
use our country on restricted sites like
hoichoi.tv chorki.com etc.
We are facing geolocation related
issue. A lot of game and services
sees us as Hong Kong. Our IP
address used to be owned by a
Hong Kong based hosting
company. Such as PUBG mobile
detects the country of our IP as
Hong Kong.
7
Services Impacted
Fintech services (e.g.
Bkash, Rocket) and
Banking websites
Gaming websites
(e.g. PubG, CSGO) Social media
and Content
Providers
Government
websites
8
8
Troubleshooting
• Check APNIC Whois registration is up to date.
• Search on APNIC Whois Database: https://apnic.net/whois
9
Troubleshooting
• Check IP information in third party GEOIP databases (such as, MaxMind, Google) and
submit a correction request if the location is incorrect.
More info: https://www.apnic.net/geolocation
10
10
Troubleshooting
• If a geolocation provider has incorrect location details of
your IP address range, contact them and request they
update the location of the range.
• Some content delivery networks (CDN) and content
providers maintain their own IP geolocation database which
may or may not use RIR data. You may want to contact
them directly to report any geolocation issues.
• Contact web admins of blocked websites directly and
inquire about the issue.
11
11
APNIC Data
• For records maintained by APNIC, the economy where the
organization is registered is recorded (with ISO-3166
country codes, e.g PK, AU)
• This information appears in:
– Public stats file
– Portable inetnum and inet6num
12
12
Public Stats file
https://ftp.apnic.net/stats/apnic/delegated-apnic-latest
13
13
Inetnum/inet6num objects
14
Member data
Parent Object for /23
inetnum: 203.176.189.0 -
203.176.190.255
netname: APNIC-SERVICES-V4
descr: APNIC
country: AU
Customer Assignment for /24
inetnum: 203.176.189.0 -
203.176.189.255
netname: APNIC-SERVICES-V4
descr: APNIC
country: AU
Customer Assignment for /24
inetnum: 203.176.190.0 -
203.176.190.255
netname: APNIC-SERVICES-V4
descr: APNIC
country: NZ
Members can register customer
assignments to indicate the location
where their network is deployed
– “country” attribute in customer
assignments can be used to
indicate the economy where those
IP addresses are used
– “geoloc” attribute can be used to
associate a latitude/longitude
coordinate pair with a particular
address block
– “geofeed” attribute can be used
by entering a URL containing
location information in csv format
15
15
Inetnum/inet6num objects examples
16
16
Geoloc
• A latitude/longitude coordinate indicating where users of
this network are located.
• Example:
geoloc: 33.738045 73.084488
• Limited success with geoloc (due to specificity/granularity
issues, human unfriendly)
• Likely to be deprecated
17
17
Geofeed
• RFC 8805 specifies a format for self-publishing geolocation
information for IP prefixes.
• Host CSV geofeed file over https and put the URL in the geofeed
attribute in the inetnum object.
• Only custodians of IPs with authorised logins/access can add this
attribute in the inetnum and inet6num object in MyAPNIC.
• Example: geofeed: https://example.com/geofeed.csv
18
How to add Geofeed
Step 1: Prepare CSV file with location information and URL
• You can host the CSV geofeed file on your domain.
• Alternatively, use a free service like GitHub or Packetvis
(https://packetvis.com/geofeed/ ) to generate the CSV file
and url.
Example:
remarks:https://geofeeds.packetvis.com/example.csv
19
19
How to add Geofeed
Step 2: Add geofeed attribute via MyAPNIC
Go to:
• MyAPNIC > Resource Manager > Whois Updates
• Select the “Update” tab
• Search IP prefix to find the inetnum object
• Select 'geofeed' from the drop-down list at the bottom of
the page > Add field > Enter the url
• Update
20
20
Why Geofeed
• Only custodians of IPs with authorised login/access can
add this attribute in the inetnum and inet6num object via
MyAPNIC.
• An organization, even big operators can maintain one
single CSV file with all their subnets. Any change in
geofeed information can be updated in the CSV file.
• The url in the inetnum/ inet6num objects does not need to
be changed as the url will still point to the same CSV file
with the updated information.
21
21
Why Geofeed
• Some geolocation providers have “auto-discovery” which means when geofeed information is
entered/updated these providers will automatically extract that information. No need to contact each
provider separately.
22
22
How to verify Geofeed
• After adding the Geofeed attribute, you can verify the information on Geolocatemuch:
https://geolocatemuch.com/?resource
Note: Allow time for the information to propagate before checking.
23
23
Fetching Geofeed Data
RFC9632 outlines how to find geofeed data, including the use
of the geofeed attribute in inetnum and inet6num objects, and how to
fetch that data from the RIRs.
• Fetch bulk FTP downloads of Whois data from each RIR directly and
process them using a script (except for ARIN, which requires AUP-type
agreement before access can be granted);
• Use a program like https://github.com/massimocandela/geofeed-finder,
which fetches data from the previous point and provides simple wrapper
functions around that data (including workarounds for fetching the ARIN
data); or
• Fetch a processed bulk geofeed CSV file like:
https://geolocatemuch.com/geofeeds/validated-all.csv
24
At the moment there are 379004 prefixes with geofeeds.
Add yours now!
Talk to the APNIC team at SANOG for support.
THANK YOU

More Related Content

Geolocation and Geofeed Implementation, presented by Subha Shamarukh

  • 2. 2 What is Geolocation? • IP geolocation is the mapping of an IP address to a geographic location (using databases and other data sources).
  • 3. 3 3 Why do we need Geolocation? • Location-Based Services • Targeted Advertising and Marketing • Enhanced User Experience • Compliance with Legal and Regulatory Requirements • Fraud Detection and Prevention • Emergency Services and Public Safety
  • 5. 5 5 IP Geolocation complaints are on the rise • APNIC has exhausted fresh 103 prefixes from final /8 block. • New addresses delegated are from recycled pool. • These IPs were in use before, so some geolocation providers may point to the old geolocation details.
  • 6. 6 6 Queries from APNIC members My customers cannot access Bkash, Rocket app with these IPs. Please help. Currently, we are getting our IP geolocation Australia. Please change our IP geolocation from Australia to Pakistan. We are getting geolocation issue in our IP. It shows Italy but we serve in Bangladesh. So how can I solve the issue? Services hosted in amazon web services detects the IP as Hong Kong Country IP. So a lot of our users are not being able to use our country on restricted sites like hoichoi.tv chorki.com etc. We are facing geolocation related issue. A lot of game and services sees us as Hong Kong. Our IP address used to be owned by a Hong Kong based hosting company. Such as PUBG mobile detects the country of our IP as Hong Kong.
  • 7. 7 Services Impacted Fintech services (e.g. Bkash, Rocket) and Banking websites Gaming websites (e.g. PubG, CSGO) Social media and Content Providers Government websites
  • 8. 8 8 Troubleshooting • Check APNIC Whois registration is up to date. • Search on APNIC Whois Database: https://apnic.net/whois
  • 9. 9 Troubleshooting • Check IP information in third party GEOIP databases (such as, MaxMind, Google) and submit a correction request if the location is incorrect. More info: https://www.apnic.net/geolocation
  • 10. 10 10 Troubleshooting • If a geolocation provider has incorrect location details of your IP address range, contact them and request they update the location of the range. • Some content delivery networks (CDN) and content providers maintain their own IP geolocation database which may or may not use RIR data. You may want to contact them directly to report any geolocation issues. • Contact web admins of blocked websites directly and inquire about the issue.
  • 11. 11 11 APNIC Data • For records maintained by APNIC, the economy where the organization is registered is recorded (with ISO-3166 country codes, e.g PK, AU) • This information appears in: – Public stats file – Portable inetnum and inet6num
  • 14. 14 Member data Parent Object for /23 inetnum: 203.176.189.0 - 203.176.190.255 netname: APNIC-SERVICES-V4 descr: APNIC country: AU Customer Assignment for /24 inetnum: 203.176.189.0 - 203.176.189.255 netname: APNIC-SERVICES-V4 descr: APNIC country: AU Customer Assignment for /24 inetnum: 203.176.190.0 - 203.176.190.255 netname: APNIC-SERVICES-V4 descr: APNIC country: NZ Members can register customer assignments to indicate the location where their network is deployed – “country” attribute in customer assignments can be used to indicate the economy where those IP addresses are used – “geoloc” attribute can be used to associate a latitude/longitude coordinate pair with a particular address block – “geofeed” attribute can be used by entering a URL containing location information in csv format
  • 16. 16 16 Geoloc • A latitude/longitude coordinate indicating where users of this network are located. • Example: geoloc: 33.738045 73.084488 • Limited success with geoloc (due to specificity/granularity issues, human unfriendly) • Likely to be deprecated
  • 17. 17 17 Geofeed • RFC 8805 specifies a format for self-publishing geolocation information for IP prefixes. • Host CSV geofeed file over https and put the URL in the geofeed attribute in the inetnum object. • Only custodians of IPs with authorised logins/access can add this attribute in the inetnum and inet6num object in MyAPNIC. • Example: geofeed: https://example.com/geofeed.csv
  • 18. 18 How to add Geofeed Step 1: Prepare CSV file with location information and URL • You can host the CSV geofeed file on your domain. • Alternatively, use a free service like GitHub or Packetvis (https://packetvis.com/geofeed/ ) to generate the CSV file and url. Example: remarks:https://geofeeds.packetvis.com/example.csv
  • 19. 19 19 How to add Geofeed Step 2: Add geofeed attribute via MyAPNIC Go to: • MyAPNIC > Resource Manager > Whois Updates • Select the “Update” tab • Search IP prefix to find the inetnum object • Select 'geofeed' from the drop-down list at the bottom of the page > Add field > Enter the url • Update
  • 20. 20 20 Why Geofeed • Only custodians of IPs with authorised login/access can add this attribute in the inetnum and inet6num object via MyAPNIC. • An organization, even big operators can maintain one single CSV file with all their subnets. Any change in geofeed information can be updated in the CSV file. • The url in the inetnum/ inet6num objects does not need to be changed as the url will still point to the same CSV file with the updated information.
  • 21. 21 21 Why Geofeed • Some geolocation providers have “auto-discovery” which means when geofeed information is entered/updated these providers will automatically extract that information. No need to contact each provider separately.
  • 22. 22 22 How to verify Geofeed • After adding the Geofeed attribute, you can verify the information on Geolocatemuch: https://geolocatemuch.com/?resource Note: Allow time for the information to propagate before checking.
  • 23. 23 23 Fetching Geofeed Data RFC9632 outlines how to find geofeed data, including the use of the geofeed attribute in inetnum and inet6num objects, and how to fetch that data from the RIRs. • Fetch bulk FTP downloads of Whois data from each RIR directly and process them using a script (except for ARIN, which requires AUP-type agreement before access can be granted); • Use a program like https://github.com/massimocandela/geofeed-finder, which fetches data from the previous point and provides simple wrapper functions around that data (including workarounds for fetching the ARIN data); or • Fetch a processed bulk geofeed CSV file like: https://geolocatemuch.com/geofeeds/validated-all.csv
  • 24. 24 At the moment there are 379004 prefixes with geofeeds. Add yours now! Talk to the APNIC team at SANOG for support. THANK YOU