Hello all,
I made this script for anyone who use multics or other emu and needs to block someone from connecting to his/her vps server.
I need it because i use freecccam and some ppl use my line on other multics servers not on a normal box to watch TV.
make 1 file..lets say ipkill and put following code in it
##################################
#####################################
Then make a file /var/etc/banned.ips
inside it put the MOFO`s IP
you can use 211.211.1.100/16 meaning you block 211.211.*.* if you know that you don`t need anyone from that vps provider to connect to your server.
All Credit goes to bebelusul
I made this script for anyone who use multics or other emu and needs to block someone from connecting to his/her vps server.
I need it because i use freecccam and some ppl use my line on other multics servers not on a normal box to watch TV.
make 1 file..lets say ipkill and put following code in it
##################################
Code:
#!/bin/bash
#multics firewall using iptables by Imp
IPT=/sbin/iptables
SPAMLIST="spamlist"
SPAMDROPMSG="SPAM LIST DROP"
BADIPS=$(egrep -v -e "^#|^$" /var/etc/banned.ips)
# create a new iptables list
$IPT -N $SPAMLIST
for ipblock in $BADIPS
do
$IPT -A $SPAMLIST -s $ipblock -j LOG --log-prefix "$SPAMDROPMSG"
$IPT -A $SPAMLIST -s $ipblock -j DROP
done
$IPT -I INPUT -j $SPAMLIST
$IPT -I OUTPUT -j $SPAMLIST
$IPT -I FORWARD -j $SPAMLIST
Then make a file /var/etc/banned.ips
inside it put the MOFO`s IP
you can use 211.211.1.100/16 meaning you block 211.211.*.* if you know that you don`t need anyone from that vps provider to connect to your server.
All Credit goes to bebelusul