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

    ubuntu curl issue, needing linux gurus

    Scheduled Pinned Locked Moved Off-Topic & Non-Support Discussion
    7 Posts 4 Posters 746 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.
    • B
      beachbum2021
      last edited by beachbum2021

      Hello,

      I am trying to download the GeoLite2-City.tar.gz mmdb so that I can setup a GeoIP Plugin within GrayLog for my PfSense firewall logs. When I run curl -O on the DL location of this file ubuntu is storing the document as the URL name. If I specify the name explicitly, I am returned an error that the file is ascii format. I've tried downloading the file directly to my windows pc, then reuploading it as mmdb for DL off a google drive location, the error is the same, the file is not gz format. What am I missing here?

      https://www.maxmind.com/en/accounts/406354/geoip/downloads
      fdc5b01d-e5c6-487b-822e-66f68576586d-image.png
      -O 85c0cbc3-4c70-4f6f-ae39-e8c8211f160f-image.png

      f3c3bf56-492e-4f19-ae56-d4609315905d-image.png

      bbc0b8a9-baf8-4847-a62a-d8ddcaa2e717-image.png

      GertjanG 1 Reply Last reply Reply Quote 0
      • GertjanG
        Gertjan @beachbum2021
        last edited by

        @beachbum2021

        And what's in that ASCI file ?

        @beachbum2021 said in ubuntu curl issue, needing linux gurus:

        I am returned an error that the file is ascii format. I've tried downloading the file directly to my windows pc, then reuploading it as mmdb for DL off a google drive location, the error is the same

        So, it's not CURL, as 'Windows' (a browser ?) also gets an ASCI file.
        So most probably : 'GEOIP' sends you an ASCI file.

        No "help me" PM's please. Use the forum, the community will thank you.
        Edit : and where are the logs ??

        1 Reply Last reply Reply Quote 1
        • S
          serbus
          last edited by serbus

          Hello!

          Try the "Get Permalinks" option for a more curl friendly link.
          Check the -O curl option to make sure that is really what you want.

          Something like this should work :

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

          If the download comes out as ascii...

          [2.5.0-RELEASE][admin@pfSense.localdomain]/tmp: file fubar.tar.gz
          fubar.tar.gz: ASCII text
          

          Cat it to see where you messed up...

          [2.5.0-RELEASE][admin@pfSense.localdomain]/tmp: cat fubar.tar.gz
          Invalid license key
          

          John

          Lex parsimoniae

          GertjanG B 2 Replies Last reply Reply Quote 1
          • GertjanG
            Gertjan @serbus
            last edited by

            @serbus said in ubuntu curl issue, needing linux gurus:

            Invalid license key

            That's far better as saying : [some tool said] : ASCI file.
            The tool - file - was right.
            It doesn't look like an asci file.
            And I bet it has a size of 18 bytes (or the gz file header is already more then 1 kilo bytes).

            Here I can introduce :pfBlockerNG MaxMind Registration required to continue to use the GeoIP functionality!

            So, you could use curl.
            But you have to include parameters, like the licence key as geoip isn't accessible without it.
            The geo server needs to know who you are - entitled to download.

            No "help me" PM's please. Use the forum, the community will thank you.
            Edit : and where are the logs ??

            1 Reply Last reply Reply Quote 1
            • B
              beachbum2021
              last edited by

              This post is deleted!
              1 Reply Last reply Reply Quote 0
              • B
                beachbum2021 @serbus
                last edited by

                @serbus that did the trick
                a628270d-7f06-49fa-9513-ce75c10a9f8c-image.png

                1 Reply Last reply Reply Quote 0
                • C
                  cristinaparker Banned
                  last edited by

                  This post is deleted!
                  1 Reply Last reply Reply Quote 0
                  • First post
                    Last post
                  Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.