RIPE parsing failing
Just been trying to get geoip-shell working on a server (running OpenSUSE) and I'm facing some issues:
Warning: "Can not find download utility with SSL support. Enable insecure downloads?". I have confirmed that I have both curl (v8.14.1) and wget (v1.20.3) installed and working so not sure why this is. In any case, I just do "y" and agree to insecure downloads for now.
The main issue:
Fetching the IP list for country 'IE' from RIPE...
Fetch successful.
fetch: Error: Failed to parse the IP list for 'IE_ipv4'.
[then the same for ipv6]
The IP list is being fetched fine, and echoing the first few lines it seems to be in JSON format like this and contains all the data:
{"messages":[],"see_also":[],"version":"0.2","data_call_name":"country-resource-list","data_call_status":"supported","cached":"false","data":{"query_time":"2025-09-etc","resources":{"asn":["1197","etc"],"ipv4":["2.57.24.0/22","etc"],"ipv6":[etc]}}}
Is that the expected format? It seems like the parse_ripe_json() function in geoip-shell-fetch.sh must be failing...
Thanks!
Hi, thank you for letting me know. I will look into both issues. In the meantime, if you would like to use other IP list sources, you can modify the -fetch script (/usr/bin/geoip-shell-fetch.sh). Insert this code in line 746:
ssl_ok=1
Then edit the config file /etc/geoip-shell/geoip-shell.conf and change http=http to http=https.
Provided that ssl is indeed supported on your system, this should allow you to fetch from ipdeny or MaxMind: geoip-shell configure -u ipdeny. ipdeny lists are essentially the same as RIPE.
Please let me know how it goes.
Thanks for the quick reply!
I've edited the fetch script as you suggest but unfortunately it's still jumping inside the if statement on the following line for some reason, and therefore erroring with the "SSL support is required to use... 🤔
This makes no sense. Please post the complete console output (preferably as text) including the command you are entering.
Also the output of
grep ssl_ok /usr/bin/geoip-shell-fetch.sh`
Ah - apologies - I was editing the geoip-shell-fetch.sh in the directory I'd downloaded to, as before when I was manually editing to debug it was successfully listening to updates from that one. Maybe because I was running sh geoip-shell-install.sh which might force it to copy the new version accross to the /usr directory or something?
In any case, that seems to have worked no problem and I can confirm it used the https version, so my server does indeed support it as I thought. Some issue with the detection then I guess - good luck finding the cause!
And it looks like therefore it is the parsing for RIPE specifically that has an issue, maybe they changed how they return their data?
Thanks for your quick support on this!
RIPE indeed recently changed the format of the JSON file delivered via their API. I updated the fetch script to support the format - the fix is available in the current main branch and will be included in the next release.
Still investigating the SSL support detection issue.
Just some confirmation of the fix, I copied in the new fetch script, ran the install with -k and all the parses work again.
Thanks for the quick fix.
Thank you @wnhuman for the confirmation.
I just released geoip-shell v0.7.6 which (among other changes) incorporates the RIPE parsing fix and changes the SSL detection logic to avoid incorrectly failing on some systems (notably OpenSuse).