Thursday, July 12, 2012

Installing Vidalia (Tor) in Ubuntu 12.04

To use onion routing in Ubuntu 12.04 you can use either of the following methods:

 Method 1

The first option is to download tor browser bundle and extract  it. Tor can be launched by running start-tor-browser script in extracted directory. If permission is denied then run "chmod -R +x * in a terminal to add executable bit to the files. During first run, Stop tor, Set the proxy in vidalia settings and Start tor again. Once the connection is established tor browser will come automatically. This is a tweaked version of firefox. By default, add-ons and other extensions are disabled. The proxy settings and port of privoxy can be found from Edit-> Preferences->Advanced->Network->Settings. You can copy the proxy and port to any application's proxy settings to make it work behind tor.

Method 2


1. Vidalia can be installed from the command line or synaptic or USC. I prefer to use the terminal for installation. 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 terminal gedit ~/.vidalia/torrc and 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/config replace 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.

http , https and ftp 127.0.0.1:8118
socks host 127.0.0.1:9050

10. Reboot the system
12. To use tor in firefox follow either steps
a) Set the proxy to
http , https and ftp 127.0.0.1:8118
socks host 127.0.0.1:9050
b) Install torbutton mozilla addon
Use toggle tor status for enabling and disabling tor in firefox

c) Use foxyproxy for custom proxy management
use 27.0.0.1:8118 and other proxies in a mixed manner specifying custom patterns in urls. (I prefer this method ).

13. In google chrome/ chromium use proxy switchy :  
https://chrome.google.com/webstore/detail/caehdcpeofiiigpdhbabniblemipncjj 

13.  For torrent use the client vuze. and set the proxy to socks  127.0.0.1:9050

14.  If you are using virtualbox then we can use the host tor network in the guest os. For that set all proxy in guest OS as : 10.0.2.2:8188

11 comments:

  1. going good till step 8 startup applications, what do i put in the command section? any help will be great thanks

    ReplyDelete
    Replies
    1. vidalia
      sleep 100 && polipo &
      Make two startup entries with above commands

      Delete
  2. At step 7 a little more detail on where the proxy setting go would be handy for us Tor noobs..like which tab to open to put the proxy settings in Vidalia.
    At step 9..when I did this I could get NO network connection..so I must have done something wrong, but damn if I know what. Is there a typical mistake that would cause that? Tor starts fine, itself, just can't get it to work with chrome.

    ReplyDelete
    Replies
    1. Its in Network page of Vidalia Settings. Tick I use a proxy to access the internet. Enter the host name and port and set the proxy type. These settings are same in Windows also.

      You might have unticked enable network in the top panel Network indicator. That might be why it is showing No network connection.

      In chrome go to settings under the hood and set up the proxy to 127.0.0.1:8118. This will set the system entirely to work under tor network. Chrome uses global settings of the system and therefore the entire system will be under tor network in that case.

      Delete
  3. I think i did it completely but this settings get warning: Jan 20 16:15:31.670 [Warning] Your application (using socks4 to port 993) is giving Tor only an IP address. Applications that do DNS resolves themselves may leak information. Consider using Socks4A (e.g. via privoxy or socat) instead. For more information, please see https://wiki.torproject.org/TheOnionRouter/TorFAQ#SOCKSAndDNS.

    How can i fix this?

    ReplyDelete
    Replies
    1. You might be using torrent. Running torrent in tor causes leakage of identity

      Delete
  4. at Step 4.... in which file the lines should be added??

    myUserName ALL= NOPASSWD: /etc/init.d/tor
    myUserName ALL= NOPASSWD: /usr/bin/polipo

    in /etc/tor/torrc an error appears:

    [notice] Read configuration file "/etc/tor/torrc".
    [warn] Failed to parse/validate config: Unknown option 'myUserName'. Failing.

    Thanks in advance!

    ReplyDelete
    Replies
    1. sudo visudo wil open the file automatically. Just scroll down paste the lines (Ctrl+ V will not work). then save the file by pressing Ctrl+O followed by enter key. Ctrl+X to exit.

      Delete
  5. When I tick off I use proxy to reach internet It not only asks for the address it asks for a port un/pw Above you stated the address was 10.3.100.211 but you didnt specify a port or un.pw. Sorry if this is a dumb Q. Forgive me.

    ReplyDelete
  6. 미국에 팀 '미나리'가 윤여정의 곁을 지키고 있다면, 한국엔 팀 '윤스테이'가 윤여정의 뒤를 든든하게 응원하고 있었다. 윤여정은 26일(이하 한국시각) 미국 LA 시내의 유니온 스테이션과 돌비 극장에서 열린 제93회 미국 아카데미 시상식에서 '미나리'(정이삭 감독)로 여우조연상을 수상했다. 개그우먼 박나래가 7년 만의 프로필 촬영에 다이어트에 돌입했다. 영화계에 따르면 박서준은 올초 '더 마블스'로 제목을 확정한 '캡틴마블2' 제안을 받고 내부 검토를 최근 마쳤다. 박서준은 '더 마블스' 촬영을 위해 현재 진행 중인 영화 '콘크리트 유토피아' 촬영이 끝나는 올 하반기 미국으로 떠날 예정이다. 카지노사이트 29일 방송된 KBS1 '다큐멘터리 윤여정'에서는 한국 배우 최초 아카데미상 수상이자 전 세계 여우조연상 42관왕이란 새 역사를 쓴 윤여정의 55년의 연기 발자취를 돌아보는 시간을 가졌다.

    ReplyDelete