OPNsense
  • Home
  • Help
  • Search
  • Login
  • Register

  • OPNsense Forum »
  • English Forums »
  • Documentation and Translation (Moderator: fabian) »
  • Spamhaus DROP and eDROP became a single list
« previous next »
  • Print
Pages: [1]

Author Topic: Spamhaus DROP and eDROP became a single list  (Read 3085 times)

thatso

  • Newbie
  • *
  • Posts: 22
  • Karma: 3
    • View Profile
Spamhaus DROP and eDROP became a single list
« on: April 23, 2024, 12:43:20 am »
Spamhaus DROP and eDROP to become a single list, effective April 10th, 2024.
The docs should be updated accordingly.
Logged

RamSense

  • Hero Member
  • *****
  • Posts: 595
  • Karma: 11
    • View Profile
Re: Spamhaus DROP and eDROP became a single list
« Reply #1 on: April 23, 2024, 09:46:08 pm »
thanks for sharing.
Logged

Beehive

  • Newbie
  • *
  • Posts: 2
  • Karma: 0
    • View Profile
Re: Spamhaus DROP and eDROP became a single list
« Reply #2 on: May 24, 2024, 07:55:56 am »
Spamhaus.org are also publishing the files as json data.
Bash script to convert the json to text. You can then host this on a web server and update your alias content links.

(Modify the variables to suit your needs)

Code: [Select]
#!/usr/bin/env bash

#
# Script to download Spamhaus IPv4 and IPv6 DROP list
# This script converts the json to a text file.
#

main() {
    local url="https://www.spamhaus.org/drop/drop_v4.json"
    local urlv6="https://www.spamhaus.org/drop/drop_v6.json"
    local output_file="/www/opnsense/spamhaus-drop_v4.txt"
    local output_filev6="/www/opnsense/spamhaus-drop_v6.txt"

    curl -s $url | jq -r 'select(.cidr != null) | .cidr' >$output_file
    curl -s $urlv6 | jq -r 'select(.cidr != null) | .cidr' >$output_filev6
}

main

# Optional
# echo -e "IP addresses have been extracted:\nIPv4: $output_file\nIPv6: $output_filev6"

Hopefully, someone will find this useful.


Cheers!
Logged

  • Print
Pages: [1]
« previous next »
  • OPNsense Forum »
  • English Forums »
  • Documentation and Translation (Moderator: fabian) »
  • Spamhaus DROP and eDROP became a single list
 

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