aboutsummaryrefslogtreecommitdiffstats
path: root/config/ntopng
diff options
context:
space:
mode:
authordoktornotor <notordoktor@gmail.com>2015-07-24 16:29:54 +0200
committerdoktornotor <notordoktor@gmail.com>2015-07-24 16:29:54 +0200
commit41ac7ea4c49f6a29727ac81e7d54b2e3997f7fe1 (patch)
treec61034bde6288d6a7ddee2886bd7200c3a06fc4f /config/ntopng
parent7a1bc3c5b3a987be042502fc0c099785633f8784 (diff)
downloadpfsense-packages-41ac7ea4c49f6a29727ac81e7d54b2e3997f7fe1.tar.gz
pfsense-packages-41ac7ea4c49f6a29727ac81e7d54b2e3997f7fe1.tar.bz2
pfsense-packages-41ac7ea4c49f6a29727ac81e7d54b2e3997f7fe1.zip
Bug #4567 - ntopng GeoIP files missing
Use fetch instead of the broken ntopng-geoipupdate.sh binary.
Diffstat (limited to 'config/ntopng')
-rw-r--r--config/ntopng/ntopng.xml15
1 files changed, 13 insertions, 2 deletions
diff --git a/config/ntopng/ntopng.xml b/config/ntopng/ntopng.xml
index 2d9cc366..ef155d18 100644
--- a/config/ntopng/ntopng.xml
+++ b/config/ntopng/ntopng.xml
@@ -254,12 +254,23 @@
config_unlock();
}
function ntopng_update_geoip() {
+ $fetchcmd = "/usr/bin/fetch";
+ $geolite_city = "https://geolite.maxmind.com/download/geoip/database/GeoLiteCity.dat.gz";
+ $geolite_city_v6 = "https://geolite.maxmind.com/download/geoip/database/GeoLiteCityv6-beta/GeoLiteCityv6.dat.gz";
+ $geoip_asnum = "https://download.maxmind.com/download/geoip/database/asnum/GeoIPASNum.dat.gz";
+ $geoip_asnum_v6 = "https://download.maxmind.com/download/geoip/database/asnum/GeoIPASNumv6.dat.gz";
$pf_version=substr(trim(file_get_contents("/etc/version")),0,3);
if ($pf_version == "2.1" || $pf_version == "2.2") {
- mwexec("/usr/pbi/ntopng-" . php_uname("m") . "/bin/ntopng-geoipupdate.sh");
+ $output_dir = "/usr/pbi/ntopng-" . php_uname("m") . "/share/ntopng";
} else {
- mwexec("/usr/local/bin/ntopng-geoipupdate.sh");
+ $output_dir = "/usr/local/share/ntopng";
}
+
+ mwexec("{$fetchcmd} -o {$output_dir} -T 5 {$geolite_city}");
+ mwexec("{$fetchcmd} -o {$output_dir} -T 5 {$geolite_city_v6}");
+ mwexec("{$fetchcmd} -o {$output_dir} -T 5 {$geoip_asnum}");
+ mwexec("{$fetchcmd} -o {$output_dir} -T 5 {$geoip_asnum_v6}");
+
ntopng_fixup_geoip();
restart_service("ntopng");
}