This howto has been tested & written for ubuntu gutsy 7.10 (it is also reported to work on ubuntu hardy & debian unstable). It shows you how to configure the onion router tor, and install the P2P client torchat. this client is written in python and runs on windows & OSX too!
TorChat helps to protect you (and your chat partners) with the following features:
- Nobody will be able to find out where you are.
- If sb. is already observing you and sniffing your internet connection they will not be able to find out:
- what you send or receive
- to whom you are sending or receiving from
- where your contacts are located
1. Install Tor & Privoxy
2. Configure Privoxy
sudo apt-get install tor privoxy
add this line at the end: (with the dot at the end)
sudo gedit /etc/privoxy/config
Now go to Firefox addons and install this neat SwitchProxy Tool. After a FireFox restart, go to Extra > Switch Proxy > manage proxies > add > standard > next.
forward-socks4a / localhost:9050 .
enter the following information into both the HTTP Proxy and SSL Proxy fields. Hostname: 127.0.0.1 Port: 8118.
use SocksV5 and port 9050 for socks
Set up any proxy exceptions you may need (localhost, 127.0.0.1 is a good idea) and then click on OK.(Do this also for the proxy label)
3. Configure Tor:
Find the following section and change it to:
sudo gedit /etc/tor/torrc
now create the hidden tor dir & restart tor:
############### This section is just for location-hidden services ###
## Once you have configured a hidden service, you can look at the
## contents of the file ".../hidden_service/hostname" for the address
## to tell people.
## HiddenServicePort x y:z says to redirect requests on port x to the
## address y:z.
HiddenServicePort 11009 127.0.0.1:11009
#HiddenServicePort 80 127.0.0.1:80
#HiddenServicePort 22 127.0.0.1:22
4. Install Torchat from Source
sudo mkdir /var/lib/tor/hidden_service/
sudo /etc/init.d/tor restart
Now you can use firefox with tor. But we want chat, so get the latest Torchat source (at the time of writing this howto it was version 0.9.9.98 ) and unzip it under your home.
move source code:
(assuming the py files are unpacked in the folder /home/username/src)
Create your "buddy-list.txt" file.
sudo mkdir /usr/share/torchat
sudo mv ~/src/* /usr/share/torchat/
Do this only for the initial install, later you want to move your existing buddy list to the /usr/share/torchat folder
replace user:user from above with your username
sudo echo "" > /usr/share/torchat/buddy-list.txt
sudo chown user:user /usr/share/torchat/buddy-list.txt
Install needed python-wx:
create starter menu entry
sudo apt-get install python-wxgtk2.8 python2.5
paste into the editor window:
sudo gedit /usr/share/applications/torchat.desktop
5. get your user ID for torchat:
Comment=anonymous chat client
this will display something like
sudo less /var/lib/tor/hidden_service/hostname
the green part is your id, tell this ID (without the .onion) your frinds to add you to their torchat.
6. Tell Torchat your User ID:
change OWN_HOSTNAME to yours, or it will NOT work!
sudo gedit /usr/share/torchat/tc_client.py
7. Run Torchat:
OWN_HOSTNAME = "defc7p5y3flzyjqy
" #.onion ( <== change the 16 Quoted chars to your onion ID ... the green one from step 5)
Now start torchat with the Start menu Icon or from a terminal:
You will see a window with your contact list. One of the contacts is labled "myself". This 16 numbers and letters are your unique address inside the Tor-Network. Wait a few minutes until the icon becomes green. Give this address to your friends so that they can add you to their list or add your friends address to your list. It all basically behaves like you would expect from an instant messenger.
The Author states that starting TorChat & logging in the tor network can sometimes take up to 15 Minutes (it takes around 1 minute for me)
The contents of the folder /var/lib/tor/hidden_service are your personal key. They must always be kept secret. If someone wants to impersonate your identity he must and will try to steal the contents of this folder from you.
Keep this always in mind. It would be a good idea to use TorChat in conjunction with something like TrueCrypt. To enable this, read on here
If you also want to remove tor (uninstall the package with dpkg -r tor), don't forget to safely delete the tor hidden_service directory /var/lib/tor/hidden_service/ with e.g. the shred tool
sudo rm /usr/share/applications/torchat.desktop
sudo rm -R /usr/share/torchat/
9. Credits & License
Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License. So knock yourself out
Bits & pieces for this howto were in true open source spirit shamelessly taken from:
- HOWTO surf anonymous by user dutch
- Torchat, written by prof7bit
- Truecrypt FAQ
- privoxy & tor manpages
- Installing SwitchProxy for Tor
- added buddy-list instructions (torchat doesn't start if file doesn't exist)
- updated torchat to 0.9.9.98 Now with anonymous filesharing support