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

Also available in: Atom PDF