I originally preformed similar steps to setup a raspberry pi for this reason, later using a very tiny Ubuntu server install.
- Using a clean Ubuntu / or / Debian installation (recommended, not necessary) add the following repositories to /etc/apt/sources.list: deb http://deb.torproject.org/torproject.org <DISTRIBUTION> main
- to figure out the name of your distribution. A quick command to run is lsb_release –c (Ubuntu) or cat /etc/debian_version (Debian)
- Next add the gpg key that was used to sign the TOR packages: gpg –keyserver keys.gnupg.net –recv 886DDD89
- Then, type sudo apt-get install deb.torproject.org-keyring
- Next type sudo apt-get update
- Next type apt-get install tor
- Once completed TOR will be installed and listening on port 9050 on 127.0.0.1 of the host. You will need to modify the following file /etc/tor/torrc and add your servers address and SOCKS Port to listen on.
- Once completed you can restart the tor service and test remotely with a machine on your network; assign a web browser the SOCKS proxy info for your server and test with: https://check.torproject.org/ if all working you will be notified that you are on the TOR network.
But what if you don’t want to use SOCKS or an application / device doesn’t have a configuration for SOCKS proxy? Well I encounter this same thing and there is a fix for that.
Using privoxy you can proxy your data via the computers current network, a VPN tunnel and in our case a SOCKS proxy.
- Back onyour server type sudo apt-get update , then sudo apt-get install privoxy
- Once installed you will need to edit the following file: /etc/privoxy/config
- You need to:
- add a listen address and port for your client machines to use.
- you need to setup a forward-socks5 connection, something like: forward-socks5 / 127.0.0.1:9050
- Restart the privoxy server and your good to test. As we did above, setup your web browser with the proxy settings and check the following address https://check.torproject.org/ all should be working and you have an always on TOR Network proxy.
For more info on TOR: https://www.torproject.org