Created
September 23, 2019 18:21
-
-
Save fatum12/537f56ba8ce8713bd64074cd606dbb71 to your computer and use it in GitHub Desktop.
Block access from Tor ip range with nginx
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
server { | |
# ... | |
include /etc/nginx/snippets/tor-block.conf; | |
# ... | |
} |
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
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