Saturday, July 5, 2014

Tor in Ubuntu 14.04

Earlier I had written how to use tor with Ubuntu 12.04 and 11.10 . Those methods have become pretty outdated. With the recent versions of tor browser bundle the process of setting up tor is simpler. But to use use tor with other applications you need to still a bit of tweaking.


1. Set up tor browser bundle

         The first step 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 a+x * in a terminal to add executable bit to the files. During first run, set the proxy  settings and exit tor. 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.  If you want to use tor just for browsing rest of the steps are irrelevant for you.

2. Find out the Control and Socks Port

          Inside the tor browser bundle directory  there is a Data/Tor directory which contains the torrc-defaults file. The Control and SocksPort are present in the file. In my case it is as follows :
SocksPort 9150
ControlPort 9151

3. Socks proxy
      
        Your socks proxy will be 127.0.0.1:SocksPort. In my case it is 127.0.0.1:9151. This can be set as the proxy in any application to use it under socks proxy provided by tor.

4.  Setting up http and https proxy for tor

     4.1 For this install polipo and make sure that privoxy is not installed.

           

     4.2 Use  sudo visudo and add the following lines at the end of file:

           

    4.3 Using editor command sudo gedit /etc/polipo/config replace the contents of /etc/polipo/config with the following content. Make sure that 9150 is replaced with your Socks Port found in step 3.

         

   4.4 Restart polipo.

           

   4.5 Set polipo not to start by default

        We have to remove the polipo 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 polipo and disable all selections by the use of space key.  sysv-rc-conf  can be quit by using the key q.
 
Now u can use the proxy 127.0.0.1:8118 as http, https and ftp proxies under tor. After tor connects run 'sudo service polipo start' to start the polipo service.

5.  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:9150
bc) 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 ).
6.  For torrent use the client vuze. and set the http or socks proxy.

7. Using tor from Virtual machine.

 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

21 comments:

  1. Thanks a lot!! Very informative. Keep it up!! :)

    ReplyDelete
  2. Thank you very much for your clear explantations and your screenshots. It went like a charm. I just wanted to add two information for Ubuntu 14.04:

    1. For 64 bit users:
    sudo apt-get install mesa-utils mesa-utils-extra libgl1-mesa-glx:i386 libgl1-mesa-dev ia32-libs
    HERE ia32-libs was replaced by lib32z1

    4. export WINEPREFIX="/home/$whoami/.wine/office2010/"
    I used /.wine/ instead of /.wineprefix/

    5. winetricks vb3run vb4run vb5run vb6run corefonts
    I didn't install vb2run since it couldn't connect to the server
    I didn't install ie8 since it makes no sense

    ReplyDelete
  3. Hi
    Thank you for this blog, very useful !
    I follow your explanation (MINT 17, office 2007) and it finally works !! Yipiiii !

    But :
    when i close word 2007, i've got the error http://cjoint.com/?DJvt1dTBUcm
    I tried to disabled this dialog :
    in winetricks > "Change settings" > i check : "nocrashdialog" but this has no effect and when i launch again winetricks, the checkbox is uncheck...

    Thanks
    Hervé

    PS : in your step 6. , is it just "riched20.dll" in "native" or all the items (there are 22)

    ReplyDelete
  4. Yipiiiiiiiiiiii everything works !! (MINT17 64 bits, office2007 (.exe special teacher))

    I uninstall and re-install office2007 then, in step 6, i put "native" to all the 22 items and i doesn't have the crasherror when closing word anymore !
    Thanks for all !

    ReplyDelete
  5. Good to know that it works in Mint 17 also. I will include that in the content :)

    ReplyDelete
  6. In step 6 it has to be done for all dlls we are installing in step 5.

    ReplyDelete
  7. I will update the content to change the ia32-libs and vb2run.

    ReplyDelete
  8. I just have a question, where is this las folder found? the one in step 8?

    ReplyDelete
  9. It is inside home directory.. Path is ~/.local/share/applications/
    The folder is hidden

    ReplyDelete
  10. Worked perfectly, thank you very much!! visit more info:- Windows live mail technical support also Call +1-800-231-4635 (Toll Free)

    ReplyDelete
  11. my comment has just been removed, can I know why?

    ReplyDelete
  12. Which comment? Nothing was removed by me.

    ReplyDelete
  13. my second comment is also removed, I don't understand! may be It's relative to the length of the message! I have a problem with step 7, I can not install Office 2010 on my Ubuntu 14.04 64 bits even if all the steps were successful! I got errors like :

    - err:menubuilder:convert_to_native_icon error 0x80070005 creating output file L"Z:\\home\\mohammed\\.local\\share\\icons\\hicolor\\256x256\\apps\\application-x-wine-extension-compositefont.png"
    - err:menubuilder:convert_to_native_icon error 0x80070005 creating output file L"Z:\\home\\mohammed\\.local\\share\\icons\\hicolor\\48x48\\apps\\1CD8_rundll32.0.png"
    - Failed to write XML file; For permission problems, try rerunning as root
    When I tried as root I got this message :
    - root@mohammed-Inspiron-5537:/home/mohammed# sudo winecfg
    p11-kit: couldn't load module: /usr/lib/i386-linux-gnu/pkcs11/gnome-keyring-pkcs11.so: /usr/lib/i386-linux-gnu/pkcs11/gnome-keyring-pkcs11.so: cannot open shared object file: No such file or directory

    Even though I got the winecfg applet and I added from above winetricks command libraries the ones that I found (riched20, msxml6, gdiplus) ; after that I wrote the command bellow which returned an error

    root@mohammed-Inspiron-5537:/home/mohammed# cd ./Office2010
    root@mohammed-Inspiron-5537:/home/mohammed/Office2010# wine setup.exe
    wine: /home/mohammed/.wineprefixes/office2010 is not owned by you

    Then I applied the chown -R mohammed:mohammed ~/.wine after which I re tried and got the same message : wine: /home/mohammed/.wineprefixes/office2010 is not owned by you

    I do not understand anything (that's absurd especially after chaging the owner of .wine )! can you help me out?

    ReplyDelete
  14. root@mohammed-Inspiron-5537:/home/mohammed
    The prompt shows you are logged in as root user and trying to install office. That will not work. All the errors shown here are based on ownership.

    I suggest you to delete the .wine and .wineprefixes folders and start over as normal user from step4.

    ReplyDelete
  15. hello,

    I've tried at first as a normal user as I esplained, then I got the message that I am not the owner of .wine, so I tried as root. Now, I tried what you suggested (delete the .wine and the .wineprefixes and started again from step 4), and these are the errors I am getting now in step 5 :
    mohammed@mohammed-Inspiron-5537:~$ winetricks vcrun2008 dotnet20 dotnet40 msxml6 riched20 riched30 gdiplus
    ------------------------------------------------------
    wine cmd.exe /c echo '%ProgramFiles%' returned unexpanded string '%ProgramFiles%' ... can be caused a corrupt wineprefix, an old wine, or by not owning /home/mohammed/.wineprefixes/office2010/
    ------------------------------------------------------
    mohammed@mohammed-Inspiron-5537:~$ chown -R mohammed:mohammed /home/mohammed/.wineprefixes/office2010/
    mohammed@mohammed-Inspiron-5537:~$ winetricks vcrun2008 dotnet20 dotnet40 msxml6 riched20 riched30 gdiplus
    ------------------------------------------------------
    wine cmd.exe /c echo '%ProgramFiles%' returned unexpanded string '%ProgramFiles%' ... can be caused a corrupt wineprefix, an old wine, or by not owning /home/mohammed/.wineprefixes/office2010/

    any idea?
    Thx!

    ReplyDelete
  16. don't bother yourself, I resolved the issue by installing Office2010 with PlayOnLinux tool.

    ReplyDelete
  17. The issue can be cured by opening /root/.wine/system.reg as well as ~/.wine/system.reg as text and inserting these two values under [System\\CurrentControlSet\\Control\\Session Manager\\Environment]

    "ProgramFiles"="C:\\Program Files"
    "SystemDrive"="c:"

    Anyway since your problem is solved dont bother. The answer might be useful to anyone else who faces same issue.

    ReplyDelete
  18. I successfully installed OFFICE 2010 on UBUNTU 14.4 64 bits by following your post. I tried several guides without same success, so thank you !

    ReplyDelete
  19. Did you encounter a window pop out saying "Please wait while windows configures Microsoft Office Professional Plus 2010" everytime you open Word2010?
    If so, run registry editor to add the following variable:
    reg add HKCU\Software\Microsoft\Office\14.0\Word\Options /v NoReReg /t REG_DWORD /d 1

    ReplyDelete
  20. Las Vegas Sands Casino Hotel - Las Vegas Strip
    Located just outside the 메리트 카지노 쿠폰 Las Vegas Strip, Sands Hotel & Casino 샌즈카지노 is 인카지노 a five-star eco-friendly casino resort and is on the Las Vegas Strip.

    ReplyDelete