Thursday, March 15, 2012

SETTING UP VIDALIA IN UBUNTU 11.10

I am working behind a proxy in Ubuntu. Many softwares doesn't work properly behind the proxy in my Campus (IIT Kharagpur) . The best solution is to use them through a socket connection using tor.

1. Vidalia can be installed from the command line or synaptic or USC. I prefer to use the terminal for installation. For installation additional repositories or PPA are not needed. If privoxy is already installed in the system then it needs to be removed as it will interfere with working of polipo.

2. The config file of torr needs to edited (replaced) with the following text. Run the command in terminalgedit ~/.vidalia/torrcand paste the following :

3. Now edit the /etc/tor/torrc file and remove the "#" from the line " ControlPort 9051" so that vidalia could control tor (sudo nano /etc/tor/torrc )

4. Use sudo visudo and add the following lines at the end of file

Save by Ctrl+O followed by enter key and exit by Ctrl+X

5. Using editor command sudo gedit /etc/polipo/configreplace the contents of /etc/polipo/config with

6. When using vidalia, it attempts to start tor and polipo, but as default
this is already running! But it not connected to the tor network. As a result vidalia returns an error message.To solve this problem we have to remove the service from startup. For that sudo apt-get install sysv-rc-conf. After installation run sudo sysv-rc-conf. It will display a table , scroll down by the use of arrow key to the line with tor and disable all ticks by the use of space key. Do the same for polipo. sysv-rc-conf can be quit by using the key q.

7. Run vidalia and edit the settings. Set the proxy which you use.

proxy: 10.3.100.211

Type: HTTP and HTTPS

8.
Open startup applications from the settings button on left extreme of top panel and add two new entries. One for vidalia and
one for polipo. Tor will be started by vidalia. So donot setup startup
for tor. The polipo startup is set with a delay. If polipo starts before
vidalia and tor it will control the port and tor will fail. So polipo
must start after vidalia and tor. This is ensured by the delay (sleep
100). Startup application commands are:

vidalia

sleep 100 && polipo &

9. Go to System Settings in top panel and open Network and select Network Proxy. Set the following values in manual mode. This will globally make the system configured to use tor proxy values.

6 comments:

Nice Post.. A couple of queries:1.Followed all the steps, but the tor connection stops at statues - "Establishing an encrypted directory connection"

2.I can use the vidalia-bundle externally, without installing it, perfectly well.. but can't connect vuze using it.. so i thought to install it using your blog and then use vuze,. Can i connect vuze through the vidalia-bundle?

1. I have never used this method for a long time. This method was used when I used Ubuntu 11.10. But in Ubuntu 12.10 this method started to fail with the same error you are facing. So I started using Tor browser bundle.

2. Vuze can connect using the bundle. But you will need to set a constant Control port. The bundle uses random ports each time by default and it varies with each run. This can be accomplished by editing the vidalia.conf in Data/Vidalia folder. The tor section should mention the control port. If you are behind a proxy server mention it in Network section. I am pasting the sections from my file below:

Also edit torrc.orig.1 same way to set SocksPort and Controlport. This is what it looks like in my case:

# If non-zero, try to write to disk less frequently than we would otherwise.AvoidDiskWrites 1# Store working data, state, keys, and caches here.DataDirectory ./Data/TorGeoIPFile ./Data/Tor/geoip# Where to send logging messages. Format is minSeverity[-maxSeverity]# (stderr|stdout|syslog|file FILENAME).Log notice stdout# Bind to this address to listen to connections from SOCKS-speaking# applications.SocksListenAddress 127.0.0.1SocksPort 9150ControlPort 9151

Hey, I got vuze working through vidalia, and torrents are downloading, but speed is slow.I have yellow smileys with the torrent, and its because of some NAT problem.My listen port was set to 28729. I used Help->NAT/Firewall Test to test the port, and it gives me - Testing port 28729 ... NAT Error - Connect attempt to 77.247.181.162:28729 (your computer) timed out after 20 seconds. This means your port is probably closed.

Then, I changed the port to 45000(randomly), and again it said-Testing port 45000 ... NAT Error - Connection to 173.254.216.68:45000 (your computer) refused.

Before testing, I manually allowed the ports through firewall by command-sudo ufw allow 45000