OPNsense
  • Home
  • Help
  • Search
  • Login
  • Register

  • OPNsense Forum »
  • Archive »
  • 22.7 Legacy Series »
  • Geoip and Ntopng
« previous next »
  • Print
Pages: [1]

Author Topic: Geoip and Ntopng  (Read 6959 times)

tokar86a

  • Newbie
  • *
  • Posts: 33
  • Karma: 0
    • View Profile
    • tokar86a.top
Geoip and Ntopng
« on: June 25, 2023, 11:03:36 am »
I have install Ntopng and run this script

ntopng supports IP geolocation, to enable this you should use the
ntopng-geoip2update.sh script to update the maxminddb geolocation
data to the latest version.

And that return whit

Fetching GeoLite2-City
fetch: https://geolite.maxmind.com/download/geoip/database/GeoLite2-City.tar.gz: No address record
GeoLite2-City.tar.gz download failed

Something wrong whit the script? Maybe it needs updating?

Logged

cookiemonster

  • Hero Member
  • *****
  • Posts: 1827
  • Karma: 95
    • View Profile
Re: Geoip and Ntopng
« Reply #1 on: June 26, 2023, 01:33:01 pm »
"No address record"
Please check that the machine this is trying the download from can resolve the name i.e DNS settings.
Logged

tokar86a

  • Newbie
  • *
  • Posts: 33
  • Karma: 0
    • View Profile
    • tokar86a.top
Re: Geoip and Ntopng
« Reply #2 on: June 27, 2023, 07:50:51 am »
Yes it seems like the script is trying to download files from a invalid link. So the included script is not working any more.
Logged

cookiemonster

  • Hero Member
  • *****
  • Posts: 1827
  • Karma: 95
    • View Profile
Re: Geoip and Ntopng
« Reply #3 on: June 27, 2023, 10:21:38 am »
I don't know what instructions you are following but maxmind changed a little a while ago. If you go to https://www.maxmind.com you need to sign up to a free account to then be able to get to downloads. And yes, the url will be different, hence this error.
They are in the form of https://download.maxmind.com/app/geoip_download?edition_id=GeoLite2-City&license_key=YOUR_LICENSE_KEY&suffix=tar.gz
Logged

tokar86a

  • Newbie
  • *
  • Posts: 33
  • Karma: 0
    • View Profile
    • tokar86a.top
Re: Geoip and Ntopng
« Reply #4 on: June 27, 2023, 10:19:15 pm »
I was following the instructions from the console log that told me to run the ntopng-geoip2update.sh
Logged

cookiemonster

  • Hero Member
  • *****
  • Posts: 1827
  • Karma: 95
    • View Profile
Re: Geoip and Ntopng
« Reply #5 on: June 27, 2023, 11:26:31 pm »
Ok fair enough. I'll ask the question in github. I don't use ntopng but it can't hurt to ask.
https://github.com/opnsense/ports/issues/174
Logged

danderson

  • Full Member
  • ***
  • Posts: 107
  • Karma: 9
    • View Profile
Re: Geoip and Ntopng
« Reply #6 on: August 10, 2023, 11:39:01 pm »
they merged an updated ntopng-geoip2update.sh in the last few weeks, but opnsense has not created the file /usr/local/etc/GeoIP.conf with the license key.   They already have a license key if you use it under firewall > aliases > geoip in the URL string your supposed to use. 

aka "https://download.maxmind.com/app/geoip_download?edition_id=GeoLite2-City&license_key=YOUR_LICENSE_KEY&suffix=tar.gz"

I modified one line in the ntopng-geoip2update.sh
it pulls the license key from the URL for GeoIP in the opnsense config file.

LICENSE_KEY=$(awk -F '&amp;|license_key=' '/<url>/''{print $3}' /conf/config.xml)

Logged

  • Print
Pages: [1]
« previous next »
  • OPNsense Forum »
  • Archive »
  • 22.7 Legacy Series »
  • Geoip and Ntopng
 

OPNsense is an OSS project © Deciso B.V. 2015 - 2024 All rights reserved
  • SMF 2.0.19 | SMF © 2021, Simple Machines
    Privacy Policy
    | XHTML | RSS | WAP2