Organize your blacklist using Concatenate...
#1
This will only be useful to server owners running linux who may have an absurd amount of entries in their blacklist.
I have found it useful for trying to break down a blacklist in to several specific sections, making the whole list easier to manage. (As compared to endlessly scrolling through one massive list)

How you use this is wholly up to you, but I wanted to make this post as I had offered up the idea to cannonfodder for the WL network.

It is a really simple concept, but one that may not be easily evident for server owners managing a blacklist.

This won't help people with short and infrequently used lists. If you have little to do with blacklisting, this will likely be over-complicating the whole process, so feel free to ignore this method.

Anyone who has experience operating in linux may find this stupid simple. Don't worry - I know i am not 're-inventing the wheel' with this.

Getting to the meat of it here: The idea is to split your blacklist up in to several manageable sections, each assigned to it's own file. You can organize it in anyway - by date or type of ban or whatever works for you.

For this example I will create 5 files:
prefix.cfg //cheating.cfg // minor.cfg // proxies.cfg // suffix.cfg

Also, we will create a folder called blacklist to store all of these files inside. You could put this anywhere, but make sure you understand the relative path to it.

mkdir blacklist
cd blacklist
touch prefix.cfg cheating.cfg minor.cfg proxies.cfg suffix.cfg

Edit the files according to their relevant data.
prefix.cfg - Will contain the information you want stored in the top of the file - contact info, maintainer info, ascii art, config documentation... Whatever you care to add, this file is optional of course.
cheating.cfg - We'll put actual cases of cheating here. Proven reports from the Obvious Cases of Cheating thread, for example.
minor.cfg - You could use this for cases of teamkilling or vote abuse, or anything else outside of cheating. You could further break this down in to specific files, but that is up to you.
proxies.cfg - Add offending proxy or vpn ranges here as they are discovered - great for tracking larger sources that are being used for ban evasion.
suffix.cfg - This is useless and optional - I just add static end of list information here - i.e. "End of Blacklist" and possibly a place to post contact information for appeals.

Once you have your blacklist entries and information added to the relevant files using a text editor of your choosing, we will use a stupid simple bash script to combine them together.
You could do this directly from the shell, but it will be easier to automate in other ways later from a script.
We will create it in the same folder for this example, only to keep it simple.
touch blacklist.sh
Add the following to the file:
#!/bin/bash
cat prefix.cfg hacking.cfg minor.cfg proxies.cfg suffix.cfg > /path/to/AC/config/serverblacklist.cfg

The above uses the cat command to write all of the files in to one. Note that this process will overwrite the current serverblacklist.cfg every time it is called.

You can make the script executable:
chmod +x blacklist.sh

And then you would run the script by typing ./blacklist.sh

You could use this method to grab data from other sources that would be written to their own .cfg files, by using cron and wget. However, this is a simple example just to explain the concept in the hopes that it might help someone out.
Change any relative paths and filenames according to your setup.

If you have a specific use case that you would like help with, feel free to comment or pm me and I would be happy to elaborate for you.
(Note that you could also do something very similar to this for whitelists, by giving each clan their own file)
Thanks given by: MPx


Messages In This Thread
Organize your blacklist using Concatenate... - by +f0r3v3r+ - 17 Jan 16, 05:14AM