• Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Search
  • Register
  • Login
Netgate Discussion Forum
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Search
  • Register
  • Login

[SOLVED] Ntop GEO MAP

Scheduled Pinned Locked Moved Traffic Monitoring
49 Posts 17 Posters 16.2k Views
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M
    manjotsc
    last edited by manjotsc Sep 1, 2019, 6:30 AM Mar 4, 2019, 4:18 AM

    I have generated API key, also enabled Maps Java API Key.
    But there is nothing populating on geo map.
    0_1551673092734_CaptureNtop.PNG
    0_1551846403381_CaptureNtop Log.PNG

    Vendor: HP
    Version: P01 Ver. 02.50
    Release Date: Wed Jul 17 2024
    Boot Method: UEFI
    24.11-RELEASE (amd64)
    FreeBSD 15.0-CURRENT
    CPU Type: Intel(R) Core(TM) i5-7500 CPU @ 3.40GHz
    Current: 3606 MHz, Max: 3400 MHz
    4 CPUs : 1 package(s) x 4 core(s)

    1 Reply Last reply Reply Quote 0
    • G
      gfeiner
      last edited by gfeiner Mar 10, 2019, 1:17 AM Mar 10, 2019, 1:08 AM

      I have the same problem. The map only shows your local host location and no flows of the traffic/connections of the selected host. I did some googling and found the issue has already been reported here: Bug9211. It seems the cause is that ntopng can't download geolocation data because the source it uses has discontinued that particular ip database. It appears the fix (using a new ip database) is in ntopng CE 3.8 (pfsense 2.4 uses v3.6). Seems we just need to wait until the ntopng package for pfsense is updated.

      1 Reply Last reply Reply Quote 1
      • M
        manjotsc
        last edited by manjotsc Feb 11, 2021, 10:04 PM Aug 11, 2019, 6:13 AM

        Step by step tutorial to fix geomap Youtube Video

        Vendor: HP
        Version: P01 Ver. 02.50
        Release Date: Wed Jul 17 2024
        Boot Method: UEFI
        24.11-RELEASE (amd64)
        FreeBSD 15.0-CURRENT
        CPU Type: Intel(R) Core(TM) i5-7500 CPU @ 3.40GHz
        Current: 3606 MHz, Max: 3400 MHz
        4 CPUs : 1 package(s) x 4 core(s)

        D R N 3 Replies Last reply Aug 16, 2019, 5:45 AM Reply Quote 5
        • D
          dragoangel @manjotsc
          last edited by Aug 16, 2019, 5:45 AM

          @manjotsc thanks for video, Im waiting for update about a year already ☹

          Latest stable pfSense on 2x XG-7100 and 1x Intel Xeon Server, running mutiWAN, he.net IPv6, pfBlockerNG-devel, HAProxy-devel, Syslog-ng, Zabbix-agent, OpenVPN, IPsec site-to-site, DNS-over-TLS...
          Unifi AP-AC-LR with EAP RADIUS, US-24

          M 1 Reply Last reply Aug 16, 2019, 7:33 AM Reply Quote 0
          • M
            manjotsc @dragoangel
            last edited by Aug 16, 2019, 7:33 AM

            @dragoangel no problem,

            Vendor: HP
            Version: P01 Ver. 02.50
            Release Date: Wed Jul 17 2024
            Boot Method: UEFI
            24.11-RELEASE (amd64)
            FreeBSD 15.0-CURRENT
            CPU Type: Intel(R) Core(TM) i5-7500 CPU @ 3.40GHz
            Current: 3606 MHz, Max: 3400 MHz
            4 CPUs : 1 package(s) x 4 core(s)

            1 Reply Last reply Reply Quote 0
            • D
              dragoangel
              last edited by dragoangel Jan 5, 2020, 1:22 AM Aug 16, 2019, 11:32 AM

              How-to fix:
              [UPDATED]:
              Get API key from MaxMind by register at https://www.maxmind.com/en/geolite2/signup
              After this - change CHANGE_ME from #5 in 2 links to your actual API key.

              1. Install System_Patches from Packages.
              2. Go to System => Patches
              3. Add new patch
              4. Give it Description, like: PFSENSE-9211 Fix GeoIP DB
              5. In Patch Contents copy-paste text:
              --- /usr/local/pkg/ntopng.inc
              +++ /usr/local/pkg/ntopng.inc
              @@ -241,16 +241,12 @@
               function ntopng_update_geoip() {
               	global $config;
               	$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";
              +	$geolite_city = "https://download.maxmind.com/app/geoip_download?edition_id=GeoLite2-City&license_key=CHANGE_ME&suffix=tar.gz";
              +	$geoip_asnum = "https://download.maxmind.com/app/geoip_download?edition_id=GeoLite2-ASN&license_key=CHANGE_ME&suffix=tar.gz";
               	$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();
               
              @@ -271,16 +267,15 @@
               
               	safe_mkdir($target_dir, 0755);
               
              -	foreach(glob("{$source_dir}/Geo*.dat*") as $geofile) {
              +	foreach(glob("{$source_dir}/Geo*.tar.gz") as $geofile) {
               		/* Decompress if needed. */
              -		if (substr($geofile, -3, 3) == ".gz") {
              -			// keep -f here, otherwise the files will not get updated
              -			mwexec("/usr/bin/gzip -d -f " . escapeshellarg($geofile));
              +		if (substr($geofile, -7, 7) == ".tar.gz") {			
              +			mwexec("tar -C {$source_dir} -f {$geofile} --strip 1 -xz '*.mmdb'");
               		}
               	}
               
               	/* Use a separate glob since the filenames could have changed since the last run */
              -	foreach(glob("{$source_dir}/Geo*.dat*") as $geofile) {
              +	foreach(glob("{$source_dir}/Geo*.mmdb") as $geofile) {
               		$target_file = $target_dir . '/' . basename($geofile);
               		if (!file_exists($target_file)) {
               			symlink($geofile, $target_file);
              
              
              1. Set Path Strip Count to 0
              2. Save it and Click Test
              3. If test done successfully - Apply button will appear.
              4. Apply patch
              5. Go to Status = >Services and Stop Ntop NG
              6. Got to Diagnostics => ntopng Settings and Remove checkbox from Enable ntopng
              7. Go to bottom of ntopng Settings and Update GeoIP Data
              8. Enable ntopng and Save - You will receive error, ignore it.
              9. Go to Status = >Services and Start Ntop NG

              P.S. Revert patch can be done from same way Test -> Revert at System Patches

              Latest stable pfSense on 2x XG-7100 and 1x Intel Xeon Server, running mutiWAN, he.net IPv6, pfBlockerNG-devel, HAProxy-devel, Syslog-ng, Zabbix-agent, OpenVPN, IPsec site-to-site, DNS-over-TLS...
              Unifi AP-AC-LR with EAP RADIUS, US-24

              G 1 Reply Last reply Dec 25, 2019, 8:35 AM Reply Quote 4
              • G
                gogglespisano
                last edited by Aug 16, 2019, 3:50 PM

                I had to set the Path Strip Count to 1.

                That will ignore the a/ and b/ path prefixes.

                --- a/usr/local/pkg/ntopng.inc
                +++ b/usr/local/pkg/ntopng.inc

                D 1 Reply Last reply Aug 16, 2019, 5:44 PM Reply Quote 0
                • G
                  gogglespisano
                  last edited by Aug 16, 2019, 3:55 PM

                  Line 203: function exec_bg undefined

                  1 Reply Last reply Reply Quote 0
                  • D
                    dragoangel @gogglespisano
                    last edited by dragoangel Aug 16, 2019, 6:06 PM Aug 16, 2019, 5:44 PM

                    @gogglespisano updated How-to, in your case try reinstall package from scratch and then apply fix

                    Latest stable pfSense on 2x XG-7100 and 1x Intel Xeon Server, running mutiWAN, he.net IPv6, pfBlockerNG-devel, HAProxy-devel, Syslog-ng, Zabbix-agent, OpenVPN, IPsec site-to-site, DNS-over-TLS...
                    Unifi AP-AC-LR with EAP RADIUS, US-24

                    1 Reply Last reply Reply Quote 0
                    • G
                      gogglespisano
                      last edited by Aug 17, 2019, 12:05 AM

                      @dragoangel Reinstalling and re-applying worked. Thanks for the Patch!

                      1 Reply Last reply Reply Quote 0
                      • R
                        recue @manjotsc
                        last edited by Aug 17, 2019, 4:16 AM

                        @manjotsc Finally, Thank you

                        1 Reply Last reply Reply Quote 0
                        • N
                          navjot @manjotsc
                          last edited by Aug 17, 2019, 5:21 AM

                          @manjotsc it's been a while I was screwing my head with this thanksss

                          1 Reply Last reply Reply Quote 0
                          • G
                            gacpac
                            last edited by Oct 12, 2019, 11:29 PM

                            Omg This was awesomeee.

                            Also, my plex server is getting flows categorized as unknown application. Is there a way to create my category for Plex?

                            There's some automated ones like netflix and that kind of stuff.

                            R 1 Reply Last reply Nov 19, 2019, 2:07 AM Reply Quote 0
                            • A
                              amarcino
                              last edited by Oct 13, 2019, 11:57 AM

                              Thanks very much for this fix.

                              1 Reply Last reply Reply Quote 0
                              • F
                                feerab
                                last edited by Oct 25, 2019, 5:10 AM

                                Thanks a lot @dragoangel

                                1 Reply Last reply Reply Quote 0
                                • H
                                  Hans from Berlin
                                  last edited by Nov 5, 2019, 2:33 PM

                                  Thank you very much dragoangel!

                                  1 Reply Last reply Reply Quote 0
                                  • R
                                    robvanhooren @gacpac
                                    last edited by robvanhooren Nov 19, 2019, 2:11 AM Nov 19, 2019, 2:07 AM

                                    @gacpac said in [SOLVED] Ntop GEO MAP:

                                    Omg This was awesomeee.

                                    Also, my plex server is getting flows categorized as unknown application. Is there a way to create my category for Plex?

                                    There's some automated ones like netflix and that kind of stuff.

                                    yes.

                                    plex should actually be recognized by ntopng (as of v3.9) but the pfS pkg is 3.8 at the moment.

                                    for now you have to do custom protocols by hand.

                                    see redmine #9912 for a bit of a howto.

                                    (that will get the protocols 'known'; afterwards, you can set them to an appropriate category in the ntop gui).

                                    G 1 Reply Last reply Nov 29, 2019, 11:57 PM Reply Quote 0
                                    • G
                                      gacpac @robvanhooren
                                      last edited by Nov 29, 2019, 11:57 PM

                                      @robvanhooren sorry but redmine #9912 where?

                                      1 Reply Last reply Reply Quote 0
                                      • R
                                        robvanhooren
                                        last edited by Nov 30, 2019, 12:03 AM

                                        the bugtracker is in the pfSense menu (top right corner of the GUI)

                                        it opens the redmine site

                                        or, you can go directly to request #9912 here

                                        hope that helps?

                                        R.

                                        1 Reply Last reply Reply Quote 0
                                        • G
                                          gniting @dragoangel
                                          last edited by gniting Dec 25, 2019, 8:35 AM Dec 25, 2019, 8:35 AM

                                          @dragoangel After applying this patch, I am seeing a flood of msgs in the system log with the following text:
                                          As of two days ago, I am seeing a ton of entries in the system log with the following msg:

                                          Attack from "192.168.7.1" on service 100 with danger 10.
                                          Did not receive identification string from 192.168.7.1 port 3736
                                          

                                          192.168.7.1 the IP of the pfsense box itself. If I turn off ntopng, the msgs go away. Any ideas?

                                          D 1 Reply Last reply Dec 25, 2019, 10:29 AM Reply Quote 0
                                          • First post
                                            Last post
                                          Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.
                                            [[user:consent.lead]]
                                            [[user:consent.not_received]]