Last active
October 2, 2019 19:33
-
-
Save jakevis/39896ff5d2b71436c22a to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# the full path of the file we create | |
filename=addTorIPs.rsc | |
rm $filename | |
# remove the comment if you want to use the List of All Current Tor Server IP Addresses | |
url=http://torstatus.blutmagie.de/ip_list_all.php/Tor_ip_list_ALL.csv | |
# remove the comment if you want to use the List of All Current Tor Server Exit Node IP Addresses | |
#url=http://torstatus.blutmagie.de/ip_list_exit.php/Tor_ip_list_EXIT.csv | |
echo "# This scrip adds Tor IP addresses to an address-list (list created: $(date))" > $filename | |
echo "/ip firewall address-list" >> $filename | |
wget -q -O - $url | sort -u | awk --posix '/^[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}/ { print "add list=addressListTor dynamic=yes address="$1" " ;}' >> $filename | |
ssh outlaw "/ip firewall address-list remove [/ip firewall address-list find list=addressListTor]" | |
scp $filename outlaw:/ | |
ssh outlaw "/import file-name=addTorIPs.rsc" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
For use with Mikrotik routers