Skip to content

Instantly share code, notes, and snippets.

@fatum12
Created September 23, 2019 18:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fatum12/537f56ba8ce8713bd64074cd606dbb71 to your computer and use it in GitHub Desktop.
Save fatum12/537f56ba8ce8713bd64074cd606dbb71 to your computer and use it in GitHub Desktop.
Block access from Tor ip range with nginx
server {
# ...
include /etc/nginx/snippets/tor-block.conf;
# ...
}
wget -qO- https://check.torproject.org/exit-addresses | grep ExitAddress | cut -d ' ' -f 2 | sed "s/^/deny /g; s/$/;/g" > /etc/nginx/snippets/tor-block.conf
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment