Secure Communication via Tor

Tor allows you to surf anonymously. It can be used not only for normal HTTP traffic but for SSH connections as well. The following is a quick installation guide.

Installation

Install security/tor and security/privoxy

Configuration

Configure privoxy to use tor, configure tor to run as a normal client only.

Add the environment variables to your local .cshrc file and in /etc/csh.cshrc

echo "setenv http_proxy http://127.0.0.1:8118/" >> .cshrc
echo "setenv HTTP_PROXY http://127.0.0.1:8118/" >> .cshrc

Now, most applications will use privoxy as a proxy through tor.

Check, if tor works: open http://check.torproject.org/ in your browser.

SSH and Tor

Install net/socat

Edit /etc/ssh/ssh_config

Host *.onion ProxyCommand socat - SOCKS4A:localhost:%h:%p,socksport-9050