- Upload
block-tor.sh
to/etc/nginx/
- Add a Cron job, Tor Exit List will be updated daily at 5 in the morning
00 05 * * * sh /etc/nginx/block-tor.sh
- Create empty file
tor-ip-list.conf
in/etc/nginx/conf.d/
or runblock-tor.sh
manually - Include Tor Exit List in nginx configuration file
include /etc/nginx/conf.d/tor-ip-list.conf;
- Test the configuration file
sudo nginx -t
If everything is ok reload nginx configuration
sudo systemctl reload nginx