Skip to content

Instantly share code, notes, and snippets.

@ecapuano
Created August 25, 2015 17:44
Show Gist options
  • Save ecapuano/fe90f8d57521e7133526 to your computer and use it in GitHub Desktop.
Save ecapuano/fe90f8d57521e7133526 to your computer and use it in GitHub Desktop.
Simple script for getting the latest list of TOR exit nodes and outputting them into a blocklist format, 1 exit node per line. Easily used as Dynamic Blocklist on Palo Alto Firewalls.
#!/bin/bash
#
# Use 'crontab -e' to create a scheduled job for this. Every 6 hours or so should be good.
# Make sure your blocking software/hardware can access the tor_nodes.txt file via HTTP / FTP / SCP / etc...
#
curl https://check.torproject.org/exit-addresses | grep ExitAddress | cut -d' ' -f2 > /var/www/html/blocklists/tor_nodes.txt
@maietta
Copy link

maietta commented Jul 20, 2017

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment