Mmdb-server - An open source fast API server to lookup IP addresses for their geographic location

Overview

mmdb-server

mmdb-server is an open source fast API server to lookup IP addresses for their geographic location. The server can be used with any MaxMind DB File Format or file in the same format.

mmdb-server includes a free and open GeoOpen-Country database for IPv4 and IPv6 addresses. The file GeoOpen-Country is generated on a regular basis from AS announces and their respective whois records.

Installation

Python 3.8+ is required to run the mmdb-server with some additional requirements.

  • pip3 install -r REQUIREMENTS
  • cp ./etc/server.conf.sample ./etc/server.conf
  • cd bin; python3 server.py

Usage

Lookup of an IP address

curl -s http://127.0.0.1:8000/geolookup/188.65.220.25 | jq .

[
  {
    "country": {
      "iso_code": "BE"
    },
    "meta": {
      "description": {
        "en": "Geo Open MMDB database - https://github.com/adulau/mmdb-server"
      },
      "build_db": "2022-01-23 16:13:05",
      "db_source": "GeoOpen-Country",
      "nb_nodes": 1156125
    }
  }
]

$ curl -s http://127.0.0.1:8000/geolookup/2a02:21d0::68:69:25 | jq .

[
  {
    "country": {
      "iso_code": "BE"
    },
    "meta": {
      "description": {
        "en": "Geo Open MMDB database - https://github.com/adulau/mmdb-server"
      },
      "build_db": "2022-01-23 16:13:05",
      "db_source": "GeoOpen-Country",
      "nb_nodes": 1156125
    }
  }
]

Output format

The output format is an array of JSON object (to support the ability to serve multiple geo location database). Each JSON object of the JSON array includes a meta and a country fields. The country give the geographic location of the IP address queried. The meta field includes the origin of the MMDB database which the the metadata.

License

    Copyright (C) 2022 Alexandre Dulaunoy 

    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU Affero General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU Affero General Public License for more details.

    You should have received a copy of the GNU Affero General Public License
    along with this program.  If not, see 
   .
You might also like...
LicenseLocation - License Location With Python
LicenseLocation - License Location With Python

LicenseLocation Hi,everyone! โค ๐Ÿงก ๐Ÿ’› ๐Ÿ’š ๐Ÿ’™ ๐Ÿ’œ This is my first project! โœ” Actual

Using Global fishing watch's data to build a machine learning model that can identify illegal fishing and poaching activities through satellite and geo-location data.
Using Global fishing watch's data to build a machine learning model that can identify illegal fishing and poaching activities through satellite and geo-location data.

Using Global fishing watch's data to build a machine learning model that can identify illegal fishing and poaching activities through satellite and geo-location data.

Script that allows to download data with satellite's orbit height and create CSV with their change in time.
Script that allows to download data with satellite's orbit height and create CSV with their change in time.

Satellite orbit height โ—พ Requirements Python = 3.8 Packages listen in reuirements.txt (run pip install -r requirements.txt) Account on Space Track โ—พ

Helping data scientists better understand their datasets and models in text classification. With love from ServiceNow.
Helping data scientists better understand their datasets and models in text classification. With love from ServiceNow.

Azimuth, an open-source dataset and error analysis tool for text classification, with love from ServiceNow. Overview Azimuth is an open source applica

A package built to support working with spatial data using open source python

EarthPy EarthPy makes it easier to plot and manipulate spatial data in Python. Why EarthPy? Python is a generic programming language designed to suppo

GeoNode is an open source platform that facilitates the creation, sharing, and collaborative use of geospatial data.
GeoNode is an open source platform that facilitates the creation, sharing, and collaborative use of geospatial data.

Table of Contents What is GeoNode? Try out GeoNode Install Learn GeoNode Development Contributing Roadmap Showcase Most useful links Licensing What is

GebPy is a Python-based, open source tool for the generation of geological data of minerals, rocks and complete lithological sequences.
GebPy is a Python-based, open source tool for the generation of geological data of minerals, rocks and complete lithological sequences.

GebPy is a Python-based, open source tool for the generation of geological data of minerals, rocks and complete lithological sequences. The data can be generated randomly or with respect to user-defined constraints, for example a specific element concentration within minerals and rocks or the order of units within a complete lithological profile.

Tile Map Service and OGC Tiles API for QGIS Server

Tiles API Add tiles API to QGIS Server Tiles Map Service API OGC Tiles API Tile Map Service API - TMS The TMS API provides these URLs: /tms/? to get i

Zora is a python program that searches for GeoLocation info for given CIDR networks , with options to search with API or without API
Zora is a python program that searches for GeoLocation info for given CIDR networks , with options to search with API or without API

Zora Zora is a python program that searches for GeoLocation info for given CIDR networks , with options to search with API or without API Installing a

Releases(v1.1)
  • v1.1(Oct 15, 2022)

  • v1.0(Jul 9, 2022)

    mmdb-server v1.0 released - an open source fast API server to lookup IP addresses for their geographic location. The server reached version 1.0 as many production servers are running flawlessly with this code. mmdb-server includes the geo-open database from CIRCL.

    Source code(tar.gz)
    Source code(zip)
  • v0.5(Feb 6, 2022)

    mmdb-server (the open and free geo IP server) version 0.5 released (2022-02-06) ๐Ÿ—บ๏ธ

    mmdb-server (the open and free geo IP server) version 0.5 released which includes the support for to load multiple MMDB files.

    A new GeoOpen database included to support AS number and AS description lookup.

    New

    • [multiple MMDB file support] MMDB server can now load a list of MMDB files + new GeoOpen file including ASN details added as example. [Alexandre Dulaunoy]

      GeoOpen files for country only -> https://cra.circl.lu/opendata/geo-open/mmdb-country/ GeoOpen files with country and ASN/ASN description -> https://cra.circl.lu/opendata/geo-open/mmdb-country-asn/

    • [db] Country-ASN db added. [Alexandre Dulaunoy]

    • [db] GeoOpen database updated. [Alexandre Dulaunoy]

    Changes

    • [doc] update the documentation and examples with the multiple sources. [Alexandre Dulaunoy]

    • [log] remove old debug. [Alexandre Dulaunoy]

    • [db] renamed. [Alexandre Dulaunoy]

    • [GeoOpen-country] updated. [Alexandre Dulaunoy]

    Other

    • Update README.md. [Alexandre Dulaunoy]
    Source code(tar.gz)
    Source code(zip)
  • v0.2(Jan 24, 2022)

    What's new in v0.2 (2022-01-24)

    New

    • [server] Add additional information about the country including average location, complete name and numeric code. [Alexandre Dulaunoy]

    • [mygeolookup] Query on root of the server will give the geo location of the remote IP address doing the query. [Alexandre Dulaunoy]

    Changes

    • [doc] update JSON output and CIRCL public service. [Alexandre Dulaunoy]

    • [server] display port. [Alexandre Dulaunoy]

    • [server] make port configurable. [Alexandre Dulaunoy]

    Source code(tar.gz)
    Source code(zip)
  • v0.1(Jan 23, 2022)

    mmdb-server is an open source fast API server to lookup IP addresses for their geographic location. The server can be used with any MaxMind DB File Format or file in the same format.

    mmdb-server includes a free and open GeoOpen-Country database for IPv4 and IPv6 addresses. The file GeoOpen-Country is generated on a regular basis from AS announces and their respective whois records.

    Installation

    Python 3.8+ is required to run the mmdb-server with some additional requirements.

    • pip3 install -r REQUIREMENTS
    • cp ./etc/server.conf.sample ./etc/server.conf
    • cd bin; python3 server.py

    Usage

    Lookup of an IP address

    curl -s http://127.0.0.1:8000/geolookup/188.65.220.25 | jq .

    [
      {
        "country": {
          "iso_code": "BE"
        },
        "meta": {
          "description": {
            "en": "Geo Open MMDB database - https://github.com/adulau/mmdb-server"
          },
          "build_db": "2022-01-23 16:13:05",
          "db_source": "GeoOpen-Country",
          "nb_nodes": 1156125
        }
      }
    ]
    

    $ curl -s http://127.0.0.1:8000/geolookup/2a02:21d0::68:69:25 | jq .

    [
      {
        "country": {
          "iso_code": "BE"
        },
        "meta": {
          "description": {
            "en": "Geo Open MMDB database - https://github.com/adulau/mmdb-server"
          },
          "build_db": "2022-01-23 16:13:05",
          "db_source": "GeoOpen-Country",
          "nb_nodes": 1156125
        }
      }
    ]
    

    Output format

    The output format is an array of JSON object (to support the ability to serve multiple geo location database). Each JSON object of the JSON array includes a meta and a country fields. The country give the geo graphic location of the IP address queried. The meta field includes the origin of the MMDB database which the the metadata.

    Source code(tar.gz)
    Source code(zip)
Owner
Alexandre Dulaunoy
Enjoy when human are using machines in unexpected ways. I break stuff and I do stuff.
Alexandre Dulaunoy
Fiona reads and writes geographic data files

Fiona Fiona reads and writes geographic data files and thereby helps Python programmers integrate geographic information systems with other computer s

null 987 Jan 4, 2023
Blender addons to make the bridge between Blender and geographic data

Blender GIS Blender minimal version : 2.8 Mac users warning : currently the addon does not work on Mac with Blender 2.80 to 2.82. Please do not report

null 5.9k Jan 2, 2023
Geographic add-ons for Django REST Framework. Maintained by the OpenWISP Project.

django-rest-framework-gis Geographic add-ons for Django Rest Framework - Mailing List. Install last stable version from pypi pip install djangorestfra

OpenWISP 981 Jan 3, 2023
Geographic add-ons for Django REST Framework. Maintained by the OpenWISP Project.

Geographic add-ons for Django REST Framework. Maintained by the OpenWISP Project.

OpenWISP 982 Jan 6, 2023
An API built to format given addresses using Python and Flask.

An API built to format given addresses using Python and Flask. About The API returns properly formatted data, i.e. removing duplicate fields, distingu

null 1 Feb 27, 2022
A simple python script that, given a location and a date, uses the Nasa Earth API to show a photo taken by the Landsat 8 satellite. The script must be executed on the command-line.

What does it do? Given a location and a date, it uses the Nasa Earth API to show a photo taken by the Landsat 8 satellite. The script must be executed

Caio 42 Nov 26, 2022
Location field and widget for Django. It supports Google Maps, OpenStreetMap and Mapbox

django-location-field Let users pick locations using a map widget and store its latitude and longitude. Stable version: django-location-field==2.1.0 D

Caio Ariede 481 Dec 29, 2022
This is a simple python code to get IP address and its location using python

IP address & Location finder @DEV/ED : Pavan Ananth Sharma Dependencies: ip2geotools Note: use pip install ip2geotools to install this in your termin

Pavan Ananth Sharma 2 Jul 5, 2022
A bot that tweets info and location map for new bicycle parking added to OpenStreetMap within a GeoJSON boundary.

Bike parking tweepy bot app A twitter bot app that searches for bicycle parking added to OpenStreetMap. Relies on AWS Lambda/S3, Python3, Tweepy, Flas

Angelo Trivisonno 1 Dec 19, 2021
A service to auto provision devices in Aruba Central based on the Geo-IP location

Location Based Provisioning Service for Aruba Central A service to auto provision devices in Aruba Central based on the Geo-IP location Geo-IP auto pr

Will Smith 3 Mar 22, 2022