Import GeoLite2 Data

Upload GeoLite2-ASN-CSV or GeoLite2-Country-CSV files to import network range data.

<%= form_with(model: @data_import, local: true, class: "space-y-6") do |form| %> <% if @data_import.errors.any? %>

There were <%= pluralize(@data_import.errors.count, "error") %> with your submission:

    <% @data_import.errors.full_messages.each do |message| %>
  • <%= message %>
  • <% end %>
<% end %>
<%= form.label :file, "Select File", class: "block text-sm font-medium text-gray-700" %>

or drag and drop

CSV or ZIP files up to 500MB

Automatic Detection

The system will automatically detect whether your file contains ASN or Country data based on:

  • Filename (containing "ASN" or "Country")
  • Column headers in the CSV file

Supported File Formats

GeoLite2-ASN-CSV

Contains network ranges with ASN and organization information

Expected files: GeoLite2-ASN-Blocks-IPv4.csv, GeoLite2-ASN-Blocks-IPv6.csv

GeoLite2-Country-CSV

Contains network ranges with country geolocation data

Expected files: GeoLite2-Country-Blocks-IPv4.csv, GeoLite2-Country-Blocks-IPv6.csv, GeoLite2-Country-Locations-*.csv

<%= form.submit "Start Import", class: "w-full flex justify-center py-2 px-4 border border-transparent rounded-md shadow-sm text-sm font-medium text-white bg-blue-600 hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500 cursor-pointer transition-colors" %>
<% end %>