Is Spamhaus publishing their block list in valid JSON?

Started by grimelog, February 05, 2025, 10:52:23 AM

Previous topic - Next topic
I've tried setting up a URL Table in JSON format for Spamhaus's blocklist using Path expressions. However, I cannot find any expression that can successfully parse it. The JSON validators I've checked claim it is invalid JSON. However, jq can still successfully parse the list. Is this a situation that's kind of like YAML, where it's possible to write valid YAML no parser can interpret? Is this a valid JSON file?

Gotta add "Path Expression"  CIDR  found here:  https://docs.opnsense.org/manual/how-tos/drop.html

As long as the rule is working, I block in and out of my wall, try port 80 browsing to: http://(breaking on purpose)45.148.123.12
looking at your live firewall log, filter on "block" traffic should be there.

I'm not really sure what you are asking.
Per instructions, the alias contains an URL to a table in JSON format.

Looking at the first couple lines:
{"cidr":"1.10.16.0/20","sblid":"SBL256894","rir":"apnic"}
{"cidr":"1.19.0.0/16","sblid":"SBL434604","rir":"apnic"}
Each line is valid JSON.
The "table" name implies one record per line. The record is in JSON.

The resulting content may have a json extension but the content type is:
< Content-Type: text/html
It's not expected to be valid JSON.

Check to make sure in the Alias field called your Path expression field has the followingcidr

Under Step 1 of the instructions link I posted.  Does your Alias match exactly what they documented, if you are missing anything, it wont work.