Copy Link
Add to Bookmark
Report

NULL mag Issue 06 25 Mystic blacklist tip

eZine's profile picture
Published in 
null magazine
 · 26 Dec 2020

  




 some bbs software like mystic bbs, has a feature to blacklist ips
that are making too many connections in a short time period to your
bbs. this prevents attacks, so its useful. the bad thing with this,
is that some times, we as users/sysops do many connection attempts
and finally, our ip gets into that file... resulting to not be able
to connect, even at our bbs sometimes.

also, many sysops don't know about this or they don't know how to
clear it or they just forget to clear it, from time to time. this way
you loose visitors, who for some weird reason, they got "banned" and
not they can't even connect to your bbs.

a solution to this problem is obviously, to clear the file. but
because we have so many things to do... we will do it automatically,
using cron or other event manager. the solution is apply able to any
bbs software, you just have to figure out, which file you have to
delete etc. for example we will make a simple script to clear a
mystic bbs blacklist.txt file. the script is simple as deleting the
file and also creating it with the 'touch' command... this is very
important! let's see the commands first:

rm <full path to file>/blacklist.txt
touch <full path to file>/blacklist.txt

for a pi installed mystic bbs... you should have something like this:

rm /home/pi/mystic/data/blacklist.txt
touch /home/pi/mystic/data/blacklist.txt

simple! make the script executable and add it as a cron job like.
initiate cron editor with: crontab -e

MAKE SURE YOU ARE NOT ROOT! make this as a simple/normal user!

in the editor that will open add this line in the bottom of the file:

00 */2 * * * <full path to script>

example:

00 */2 * * * /home/pi/mystic/clearbllst.sh

save and exit the editor... the new cron job will be installed. the
cron command/job we applied, will delete the blacklist.txt file every
two hours at exactly 00/zero minutes. this means that someone that
makes too many logins and got banned... he will have to wait for
about two hours to be able to login again. you can change this to
whatever you want. for example to erase the file every 12 hours you
will enter the command like this:

00 */12 * * * /home/pi/mystic/clearbllst.sh

it is very important to re-create the file! if you just delete it,
mystic server (mis) will create it, but with root access only! so
next time you will go to edit it, you have to be a root user! this is
not a good way to do it and the file originally belongs to a normal
user. so we execute our cronjob as a normal user and recreate the
file, to avoid the creation of the blacklist file with root access.

if you liked this tutor press the like button below and subscribe to
our ascii-feed... :p


[ like ] [ subscribe ] [ back ]





← previous
next →
loading
sending ...
New to Neperos ? Sign Up for free
download Neperos App from Google Play
install Neperos as PWA

Let's discover also

Recent Articles

Recent Comments

Neperos cookies
This website uses cookies to store your preferences and improve the service. Cookies authorization will allow me and / or my partners to process personal data such as browsing behaviour.

By pressing OK you agree to the Terms of Service and acknowledge the Privacy Policy

By pressing REJECT you will be able to continue to use Neperos (like read articles or write comments) but some important cookies will not be set. This may affect certain features and functions of the platform.
OK
REJECT