--- title: "GeoIP" slug: "fmadio-application-pcap2json-geoip" updated: 2026-11-24T06:12:33Z published: 2026-11-24T06:12:33Z canonical: "docs.fmad.io/fmadio-application-pcap2json-geoip" --- > ## Documentation Index > Fetch the complete documentation index at: https://docs.fmad.io/llms.txt > Use this file to discover all available pages before exploring further. # GeoIP FMADIO PCAP2JSON support GeoIP information provided by MaxMind. Generating a MAP requires the following. e.g. from Maxmind GeoIP Lite database + custom hosts file In this case we have the Maxmind City Geo database ```plaintext --maxmind-city-block /mnt/store1/cache/json/GeoLite2-City-Blocks-IPv4.csv  --maxmind-city-location /mnt/store1/cache/json/GeoLite2-City-Locations-en.csv ``` Then the MaxMind ASN database ```plaintext --maxmind-asn /mnt/store1/cache/json/GeoLite2-ASN-CSV_20200324/GeoLite2-ASN-Blocks-IPv4.csv ``` Then the MaxMind ISP database ```plaintext --maxmind-isp /mnt/store1/cache/json/GeoIP-124_20200714/GeoIPISP.csv ``` Then a custom Hosts file ```plaintext --hosts /mnt/store0/git/json_wrangle/app/pcap2json_map/hosts.csv ``` Then a scratch-file (ensure that path to file is a mounted scratch disk) as the process will require 200-500GB of scratch space to complete processing. ```plaintext --scratch-file /mnt/store1/scratch.map ``` All resulting in a final command line as follows ```plaintext $ ./pcap2json_map  --scratch-file /mnt/store1/scratch.map                   --maxmind-city-block /mnt/store1/GeoLite2-City-Blocks-IPv4.csv                   --maxmind-city-location /mnt/store1/GeoLite2-City-Locations-en.csv                   --maxmind-asn /mnt/store1/GeoLite2-ASN-CSV_20200324/GeoLite2-ASN-Blocks-IPv4.csv                   --maxmind-isp /mnt/store1/GeoIP-124_20200714/GeoIPISP.csv                   --hosts /mnt/store1/hosts.csv                   --tag0-file /mnt/store1/tag0.csv                   --generate ``` The output file is shown below ```plaintext fmadio@fmadio40v2-194:/opt/fmadio/bin$ ls -alh geoip_fmadio.geo -rw-r--r--    1 fmadio   staff     421.1M May 17 22:16 geoip_fmadio.geo fmadio@fmadio40v2-194:/opt/fmadio/bin$ ``` Typically this is 400MB-2GB in size depending on the input dataset. Enabling it in pcap2json.lua configuration file requires ## 1) copying geo_fmadio.geo copying the generated geo_fmadio.geo to /mnt/store0/etc/pcap2json_map.geo ## 2) Enable in pcap2json.lua config Enabling it in pcap2json.lua configuration file as follows ```plaintext ["backend"] = {         .         .                "--geoip /mnt/store0/etc/pcap2json_map.geo",        .        . } ```