Below is my firewall blacklist update script, I use UFW on all my servers.
The script is easily adaptable and you can use any blacklists that you like, just replace the blacklist links with your own.
To add or remove blacklists you have to add another “wget” , you will also have to adjust the “rm” and “sort” command.
If you use this script be sure to add a rule for ssh for the port set in your ssh configuration, usually this is port 22. You can add this in the custom rules section so that you dont get locked out.