Project

General

Profile

Actions

Bug #10332

closed

PFBlockerNG loading GeoLite2-Country.mmdb

Added by John Clark over 4 years ago. Updated about 4 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
pfBlockerNG
Target version:
-
Start date:
03/10/2020
Due date:
% Done:

0%

Estimated time:
Plus Target Version:
Affected Version:
2.4.5
Affected Plus Version:
Affected Architecture:
SG-3100

Description

Running pfsense 2.4.5.r.20200305.1800 with pfBlockerNG-devel 2.2.5_29

After downloading GeoLite2-Country.tar.gz, pfb extracts the mime type from the download using the "file" command.
The file command returns "application/gzip" for GeoLite2-Country.tar.gz
PFB then uses the mime type to determine how to handle the download. The default is to rename the download to the target name.
The application/gzip type is not one of the handled types, so GeoLite2-Country.tar.gz is renamed to GeoLite2-Country.mmdb
When mmdblookup tries to lookup the country info from filter logs during report generation, it receives the error:

Can't open /usr/local/share/GeoIP/GeoLite2-Country.mmdb - The MaxMind DB file contains invalid metadata

The GeoIP info in pfb reports is then listed and "Unk"

In the pfb_download function, changing :

if ($file_type  'application/x-gzip') {

to:

if ($file_type  'application/x-gzip' || $file_type == 'application/gzip') {

appears to solve the problem.

Actions #1

Updated by Jim Pingle over 4 years ago

  • Category set to pfBlockerNG
Actions #2

Updated by Marcos M about 4 years ago

I could not reproduce this on pfSense 2.4.5-p1 running pfBlockerNG-devel 2.2.5_36.

Looking under /usr/local/share/GeoIP/ I can see GeoLite2-Country.mmdb is extracted correctly from GeoLite2-Country.tar.gz.

Actions #4

Updated by Marcos M about 4 years ago

  • Status changed from New to Closed

Indeed it does!

Actions

Also available in: Atom PDF