OPNsense Forum

Archive => 19.7 Legacy Series => Topic started by: emiletenhagen on August 09, 2019, 12:04:55 pm

Title: (Solved) GEOIP not updating
Post by: emiletenhagen on August 09, 2019, 12:04:55 pm
I noticed with comparing the download from https://geolite.maxmind.com/download/geoip/database/GeoLite2-Country-CSV.zip that there are ip ranges which are not in the pftables of the alias of geoip.

Comparing the dates on the system and the file, the downloaded is newer.
Running manually alias.py or geoip.py provides the error: file name to long.
Title: Re: GEOIP not updating
Post by: unipacket on August 10, 2019, 03:24:26 pm
Hi emiletenhagen

I see the same thing about the file name being too long when I ran geoip.py script
Title: Re: GEOIP not updating
Post by: unipacket on September 10, 2019, 04:25:49 am
Checked today and still see the file name to long message.  Running 19.7.3.  Is anyone else seeing this? 

Code: [Select]
root@firewall:~ # /usr/local/opnsense/scripts/filter/lib/geoip.py
/usr/local/opnsense/scripts/filter/lib/geoip.py:
    Copyright (c) 2016-2019 Ad Schellevis <ad@opnsense.org>
    All rights reserved.

    Redistribution and use in source and binary forms, with or without
    modification, are permitted provided that the following conditions are met:

    1. Redistributions of source code must retain the above copyright notice,
     this list of conditions and the following disclaimer.

    2. Redistributions in binary form must reproduce the above copyright
     notice, this list of conditions and the following disclaimer in the
     documentation and/or other materials provided with the distribution.

    THIS SOFTWARE IS PROVIDED AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
    INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
    AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
    AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
    OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
    SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
    INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
    CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
    ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
    POSSIBILITY OF SUCH DAMAGE.

    --------------------------------------------------------------------------------------
    download maxmind GeoLite2 Free database into easy to use alias files [<COUNTRY>-<PROTO>] located
    in /usr/local/share/GeoIP/alias
: File name too long
/usr/local/opnsense/scripts/filter/lib/geoip.py: import: not found
/usr/local/opnsense/scripts/filter/lib/geoip.py: import: not found
/usr/local/opnsense/scripts/filter/lib/geoip.py: import: not found
/usr/local/opnsense/scripts/filter/lib/geoip.py: import: not found
/usr/local/opnsense/scripts/filter/lib/geoip.py: import: not found
/usr/local/opnsense/scripts/filter/lib/geoip.py: import: not found
/usr/local/opnsense/scripts/filter/lib/geoip.py: import: not found
/usr/local/opnsense/scripts/filter/lib/geoip.py: 38: Syntax error: "(" unexpected
Title: Re: GEOIP not updating
Post by: franco on September 10, 2019, 04:32:59 pm
I'm not sure what you're trying to achieve, but executing this manually in a shell...

# /usr/local/opnsense/scripts/filter/lib/geoip.py

... is definitely wrong, because it is a Python module.


Cheers,
Franco
Title: Re: GEOIP not updating
Post by: unipacket on September 13, 2019, 07:41:21 pm
I guess call it a lack of understanding on my part.  I don't know much about the innerworkings of opnsense, thought maybe this was a bug since i was seeing the same thing as emiletenhagen.  Sorry  :-[
Title: Re: GEOIP not updating
Post by: franco on September 16, 2019, 04:15:40 pm
No worries. The real question: is it fixed on 19.7.4?


Cheers,
Franco
Title: Re: GEOIP not updating
Post by: emiletenhagen on September 17, 2019, 11:41:13 am
Hello, I checked today and the GeoIP is updating.

In /usr/local/share/GeoIP/alias and /var/db/aliastables the files with regard to GEOIP have now the date of yesterday.

Rgds.