Tails is based on debian. How can one install and configure the different components on a running debian box to make all traffic passed through tor; like tails ? What are the firewall configuration ? Any help is most welcome.

Tails is based on debian. How can one install and configure the different components on a running debian box to make all traffic passed through tor; like tails ? What are the firewall configuration ? Any help is most welcome.