drmike
100% Tier-1 Gogent
So earlier tonight, vpsBoard was DDoS attacked offline. The source, malicious traffic from Tor.
We've taken steps TO BLOCK TOR. No more Tor traffic. If you use it, get a VPN or Proxy or vpsBoard will probably not work much for you.
This script is borrowed from Github and slightly modified by me to work
You must have python and iptables installed.
Paste the following in your script directory --- I called mine black.py
import urllib2, subprocess, shlex, time
def addrule(ip):
dot = ip.split('.')
if len(dot)==4:
time.sleep(0.1)
subprocess.Popen(shlex.split("iptables -A BLACKLIST -s "+ip+" -j DROP"))
else:
pass
def main():
tor_list = urllib2.urlopen('http://torstatus.blutmagie.de/ip_list_exit.php/Tor_ip_list_EXIT.csv')
subprocess.Popen(shlex.split("iptables -N BLACKLIST"))
subprocess.Popen(shlex.split("iptables -F BLACKLIST"))
subprocess.Popen(shlex.split("iptables -A INPUT -j BLACKLIST"))
for ip_tor in tor_list.readlines():
addrule(ip_tor)
print(ip_tor)
try:
main()
except OSError:
print "You don't have Permission!"
To run this:
python black.py
That will run to Tor's public exit node list and fetch the current list. It then loops through the list and throws the blocks down in iptables.
This should work in any Linux environment and be portable.
When done, plug it into cron at interval of once every 60 minutes.
We've taken steps TO BLOCK TOR. No more Tor traffic. If you use it, get a VPN or Proxy or vpsBoard will probably not work much for you.
This script is borrowed from Github and slightly modified by me to work
You must have python and iptables installed.
Paste the following in your script directory --- I called mine black.py
import urllib2, subprocess, shlex, time
def addrule(ip):
dot = ip.split('.')
if len(dot)==4:
time.sleep(0.1)
subprocess.Popen(shlex.split("iptables -A BLACKLIST -s "+ip+" -j DROP"))
else:
pass
def main():
tor_list = urllib2.urlopen('http://torstatus.blutmagie.de/ip_list_exit.php/Tor_ip_list_EXIT.csv')
subprocess.Popen(shlex.split("iptables -N BLACKLIST"))
subprocess.Popen(shlex.split("iptables -F BLACKLIST"))
subprocess.Popen(shlex.split("iptables -A INPUT -j BLACKLIST"))
for ip_tor in tor_list.readlines():
addrule(ip_tor)
print(ip_tor)
try:
main()
except OSError:
print "You don't have Permission!"
To run this:
python black.py
That will run to Tor's public exit node list and fetch the current list. It then loops through the list and throws the blocks down in iptables.
This should work in any Linux environment and be portable.
When done, plug it into cron at interval of once every 60 minutes.
Last edited by a moderator: