How to route all services and traffic including DNS through the Tor network.
Tor Iptables script is an anonymizer that sets up iptables and tor to route all services and traffic including DNS through the Tor network.

How to Route all traffic through the Tor network.
From time to time, especially running hidden services, we have a requirement route all traffic to and from the server through the TOR network. Here is a very simple, yet effective way to achieve this.
Kudos to Rupert Edwards for the original script.
Tor Iptables script is an anonymizer that sets up iptables and tor to route all services and traffic including DNS through the Tor network.
Dependencies:
apt install tor
Usage:
toriptables2.py
To test:
- Check My IPx
- Check Tor Project
- Witch proxy checker
- Do I leak
- DNS leak test
- Test IPv6
- What every Browser knows about you
To manually change IP w/o reload:
Refresh Check Tor Project webpage
sudo kill -HUP $(pidof tor)
To automate changing Tor IP:
Screenshots:
toriptables2g with GUI notification
Dependencies:
apt install tor python-notify