(manual approval) Limiting signups from TOR Endpoints (using cron) #19071
shleeable
started this conversation in
Show and tell
Replies: 1 comment
-
Crontab should be something like this.. to run at midnight every night. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hey, the following can be added to a local crontab on your mastodon instance. This will add all of the ip addresses of the exit nodes to the IP blocklist for 24 hours - and require any signup from a tor exit node to be manually approved.
This curl command will not bypass the API throttling.. so I've added a sleep for 1 second between IP addresses to hopefully work within the limit.
curl -s https://check.torproject.org/torbulkexitlist | xargs -n1 -I + bash -c '"$@"; sleep 1' _ curl -H "Authorization: Bearer XXXXX" -d "ip=+&severity=sign_up_requires_approval&comment=Tor%2Fexit%2Fnode&expires_in=86400" https://aus.social/api/v1/admin/ip_blocks
Beta Was this translation helpful? Give feedback.
All reactions