Skip to content

Instantly share code, notes, and snippets.

@shinebayar-g
Forked from tiagoad/block-tor.sh
Last active December 18, 2018 10:28
Show Gist options
  • Save shinebayar-g/37d07fb88fef653866b592f523827196 to your computer and use it in GitHub Desktop.
Save shinebayar-g/37d07fb88fef653866b592f523827196 to your computer and use it in GitHub Desktop.
Cronjob to block tor exit nodes with nginx on debian 8 jessie (tested on Ubuntu 16.04 , 18.04)
wget -qO- https://check.torproject.org/exit-addresses | grep ExitAddress | cut -d ' ' -f 2 | sed "s/^/deny /g; s/$/;/g" > /etc/nginx/conf.d/tor-block.conf; systemctl reload nginx
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment