# The Ubuntu Forum Community > Ubuntu Specialised Support > Security > [ubuntu] Ubuntu 10.04 and Tor

## Richiegs

I just upgraded to Ubuntu 10.04, but I could not find any instructions on how to install Tor for Ubuntu 10.04. Any suggestions? Thanks

----------


## 2061.shy

Hi,
I think guides like
http://www.webupd8.org/2009/09/how-t...tu-debian.html
would work for any version.

----------


## rookcifer

> I just upgraded to Ubuntu 10.04, but I could not find any instructions on how to install Tor for Ubuntu 10.04. Any suggestions? Thanks


First open a terminal and cut and paste this command:



```
sudo echo 'deb http://deb.torproject.org/torproject.org lucid main' > /etc/apt/sources.list.d/tor.list && gpg --keyserver keys.gnupg.net --recv 886DDD89 && gpg --export A3C4F0F979CAA22CDBA8F512EE8CBC9E886DDD89 | sudo apt-key add - && sudo aptitude update && sudo aptitude install tor tor-geoipdb polipo
```

The above installs the official Tor project repo and adds their key.

Now edit the polipo config file like so:



```
sudo gedit /etc/polipo/config
```

Now _delete everything_ in that file and replace it with this configuration.  Be sure to hit "save" on gedit and then exit it.  This config file is directly from the official Tor website.

Now type this:



```
sudo service tor restart && sudo service polipo restart
```

Then in Firefox install the "torbutton" add-on.

You now have a fully functional Tor setup ready for action.  :Guitar:

----------


## Richiegs

[QUOTE=rookcifer;9241642]First open a terminal and cut and paste this command:



```
sudo echo 'deb http://deb.torproject.org/torproject.org lucid main' > /etc/apt/sources.list && gpg --keyserver keys.gnupg.net --recv 886DDD89 && gpg --export A3C4F0F979CAA22CDBA8F512EE8CBC9E886DDD89 | sudo apt-key add - && sudo aptitude update && sudo aptitude install tor tor-geoipdb polipo
```

The above installs the official Tor project repo and adds their key.

It did not work. Permission denied!

----------


## rookcifer

There should be no "permission denied" if you entered your sudo password.  Please post the exact output from the terminal after you run the command.  I am not sure what "permission denied" in this context is referring to.  I double checked the command and everything looks correct.

----------


## OpSecShellshock

Or was it "permission denied" from the website, as in the http response code?

----------


## carranty

I'm having the same issue.  I've just upgraded to 10.04 and would like to get Tor installed.  I tried the above command and got 


bash: /etc/apt/sources.list: Permission denied

as a response.

----------


## carranty

In fact it never even asked me for my sudo password, just gave the above output straight away.

----------


## perkins99

Try this instead:



```
sudo echo 'deb http://deb.torproject.org/torproject.org lucid main' | sudo tee -a /etc/apt/sources.list && gpg --keyserver keys.gnupg.net --recv 886DDD89 && gpg --export A3C4F0F979CAA22CDBA8F512EE8CBC9E886DDD89 | sudo apt-key add - && sudo aptitude update && sudo aptitude install tor tor-geoipdb polipo
```

http://stackoverflow.com/questions/8...e-command-line




> The tee command is called as the superuser via _sudo_  and the _-a_ argument tells tee to append to the file instead of  overwriting it.
>   Your original command failed, as the IO redirection with _>>_  will be done as the regular user, only your echo was executed with  sudo.

----------


## impert

The instructions on the Tor site worked well for  me. It's pretty much what Richiegs posted, but the commands are not strung together.
If all else fails you could always try sudo su. Sometimes there are things that sudo won't let you do for some reason.

@ carranty:
*sudo* /etc/apt/sources.list

If you forget to use sudo for commands which require root permissions, you can use sudo !! to repeat the last command. You will have to give your password, of course.

----------


## todd1049

I tried the instructions on the tor web page (http://www.torproject.org/docs/debian.html.en), but when I typed the command

$ gpg --keyserver keys.gnupg.net --recv 886DDD89

I got the following message:

gpg: requesting key 886DDD89 from hkp server keys.gnupg.net
gpgkeys: HTTP fetch error 7: couldn't connect to host
gpg: no valid OpenPGP data found.
gpg: Total number processed: 0

For those who were able to install it, how did you get around (or avoid) this problem?  I am able to load the keys.gnupg.net site in firefox, but when I do a search for key 886DDD89, the site tells me there is no such key.  I am using 10.04, and am wondering if that is causing a problem.

----------


## rookcifer

> I tried the instructions on the tor web page (http://www.torproject.org/docs/debian.html.en), but when I typed the command
> 
> $ gpg --keyserver keys.gnupg.net --recv 886DDD89
> 
> I got the following message:
> 
> gpg: requesting key 886DDD89 from hkp server keys.gnupg.net
> gpgkeys: HTTP fetch error 7: couldn't connect to host
> gpg: no valid OpenPGP data found.
> ...


Try a different keyserver.  I often have problems with some of them (the Ubuntu keyserver is the worst).  Try this:

gpg --keyserver pgp.mit.edu --recv 886DDD89

----------


## todd1049

Hi rookcifer, thanks for the tip, but the mit.edu site did not work, either.  The result was the same.  Can you recommend any other sites I could try?  Thanks.

----------


## crashus

yup I'm having the same problem.

Permission denied.

Didn't even asked me for the sudo password, so I tired first the sudo -s, than the command, and I got:


```
sudo echo 'deb http://deb.torproject.org/torproject.org lucid main' | sudo tee -a /etc/apt/sources.list && gpg --keyserver keys.gnupg.net --recv 886DDD89 && gpg --export A3C4F0F979CAA22CDBA8F512EE8CBC9E886DDD89 | sudo apt-key add - && sudo aptitude update && sudo aptitude install tor tor-geoipdb polipo
deb http://deb.torproject.org/torproject.org lucid main
gpg: WARNING: unsafe ownership on configuration file `/home/uros/.gnupg/gpg.conf'
gpg: external program calls are disabled due to unsafe options file permissions
gpg: keyserver communications error: general error
gpg: keyserver receive failed: general error
```

----------


## 1oki

I am having the same issue, and narrowed it down to the port being blocked by my firewall (port # 11371). I am here at work, and instead of going into my cisco to open it, I am just going to try to do an ssh tunnel and forward this port...

----------


## PDA1

I got Vidalia running and it says I'm connected to the Tor network.  However, when I check if I'm _really_ connected to Tor using some address at Tor that'll verify I'm on Tor...it says I'm not.  But, I can look at the Network map on Vidalia.

On the other hand.....if I shut down Vidalia and use the TorButton......then Tor says I'm indeed on Tor and have a different Ip address.

Any ideas?

----------


## GrandTheft

backup your sources.list before applying any command from this post.

Best regards, 
GT

----------


## sattahs

thank you all,  perkins and rookcifer. i am new to linux and i am  studying the pocket guide by Keir thomas. everything seems to be working fine as i read along but i had problem using tor like i use to on windows but you guys saved my ***. i am falling in love with ubuntu. please if there is any new tip for newbies like me enlighten me.

----------


## pkjm17

This is what I got...



```
pat@pat-desktop:~$ sudo service tor restart && sudo service polipo restart
tor: unrecognized service
```

----------


## bodhi.zazen

IMO the tor bundle is by far the easiest method to run TOR

http://www.torproject.org/torbrowser/

There is a linux version, works great, very simple to  use.

----------


## Oxwivi

Tor bundles are for newbies to use who don't want to bother with configuration, but I don't like the extra stuff it installs, so I prefer the custom way.

A friend of mine can't access the Tor website (it's blocked where he's at vacation), I introduced Ubuntu to him and he needed proxy as well. So anyway, I compiled Tor from source code in to .deb files to send it to him, and installed it from the .deb  myself to try it out. In the direct installation, start/stoping tor was done from:


```
etc/init.d/Tor/
```

However, installing from my compiled .deb allowed me start it like the other softwares, just by typing it's name in the terminal. When installed directly, it booted at start up (required BUM to stop this), but installation from .deb didn't. What do you guys think?

----------


## clementeb

Hi,  I am getting crazy here. No matter what way I try, I cannot install. I tried from source, but it told me libevent was not there although it was, then adding the repositories, but I always get the following message: tor:  Depends: tsocks  but it is not installable  Recommends: socat  but it is not installable  Recommends: tor-geoipdb but it is not going to be installed  What can I do? Thank you for any suggestion

----------


## bodhi.zazen

> Tor bundles are for newbies to use who don't want to bother with configuration, but I don't like the extra stuff it installs, so I prefer the custom way.


Interesting you say that, then ask for assistance with customization.

If you compiled for source you will need to write a custom init script.




> Hi,  I am getting crazy here. No matter what way I try, I cannot install. I tried from source, but it told me libevent was not there although it was, then adding the repositories, but I always get the following message: tor:  Depends: tsocks  but it is not installable  Recommends: socat  but it is not installable  Recommends: tor-geoipdb but it is not going to be installed  What can I do? Thank you for any suggestion


Did you try the tor bundle ?

Did you try this page ?

https://help.ubuntu.com/community/Tor

----------


## rookcifer

I am amazed so many have such a hard time installing Tor.  It's really quite simple.  

First you need to add the Tor repo to your /etc/apt/sources.list.  Add the following lines (Ubuntu lucid users only):



```
deb http://deb.torproject.org/torproject.org lucid main
deb-src http://deb.torproject.org/torproject.org lucid main
```

Second, you need to add the key:



```
gpg --keyserver keys.gnupg.net --recv 886DDD89
gpg --export A3C4F0F979CAA22CDBA8F512EE8CBC9E886DDD89 | sudo apt-key add -
```

Third, update your repo list and then install tor:



```
sudo apt-get update && sudo apt-get install tor tor-geoipdb
```

Fourth, install polipo:



```
sudo apt-get install polipo
```

Fifth, configure polipo:

Go to this link and copy everything.  Then open /etc/polipo/config and delete everything there.  Then replace it with what you just copied from the above link (you will need to open the config file with sudo privs).

Sixth, restart polipo and tor:



```
sudo service polipo restart && sudo service tor restart
```

Seventh.  Install Torbutton from the Mozilla extensions page.

Eigth: Make sure Tor works by turning Torbutton on and then visiting this link.

----------


## bodhi.zazen

FYI : You do NOT need polipo (or any other proxy) to use the TOR network.

FYI: If you want adblock (tor is IMO slow enough that I do not want to DL adds) use privoxy (or bfilter) rather then polipo.

Did I mention the TOR bundle ? It is simple to use and very feature rich.

----------


## rookcifer

> FYI : You do NOT need polipo (or any other proxy) to use the TOR network.


True but it's recommended.




> FYI: If you want adblock (tor is IMO slow enough that I do not want to DL adds) use privoxy (or bfilter) rather then polipo.


Privoxy is deprecated.  The Tor developers recommend using Polipo instead of Privoxy.  For one it's much faster. It's why they list Polipo (and not Privoxy) in the installation instructions on their website.

From the Tor FAQ:




> *Why do we need Polipo or Privoxy with Tor? Which is better?*
> 
> The first question is, "why a http proxy at all?"
> 
> The answer is, because Firefox SOCKS layer has hard-coded timeouts, and other issues,  https://bugzilla.mozilla.org/show_bug.cgi?id=280661. Personally, I don't use an http proxy, I simply let my browser talk to tor via socks directly. The user experience sucks, because you'll receive untold numbers of "The connection has timed out" warnings, because firefox won't wait for Tor to build a circuit. Chrome, Safari, and Arora (amongst others) don't have this problem.
> 
> Once Firefox fixes bug 280661, we don't need a http proxy at all. *However, given the current pace of progress on 280661, we may switch to Chrome before the fix occurs.*
> 
> The second question is, "why switch from privoxy to polipo?"
> ...

----------


## pkjm17

> I am amazed so many have such a hard time installing Tor.  It's really quite simple.  
> 
> First you need to add the Tor repo to your /etc/apt/sources.list.  Add the following lines (Ubuntu lucid users only):
> 
> 
> 
> ```
> deb http://deb.torproject.org/torproject.org lucid main
> deb-src http://deb.torproject.org/torproject.org lucid main
> ...


This is the output I get after I do 

```
sudo apt-get update && sudo apt-get install tor tor-geoipdb
```

Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
  tor: Depends: tsocks but it is not installable
       Recommends: socat but it is not installable
E: Broken packages

----------


## bodhi.zazen

> True but it's recommended.
> 
> Privoxy is deprecated.  The Tor developers recommend using Polipo instead of Privoxy.  For one it's much faster. It's why they list Polipo (and not Privoxy) in the installation instructions on their website.


Thank you for the clear explanation.

I have been happy with Privoxy as I use it for adblock as well. Personally, in the past, I do not see a performance hit wit Privoxy nor a performance gain with polipo.

With that said, I will look at polipo again.

----------


## bodhi.zazen

> This is the output I get after I do 
> 
> ```
> sudo apt-get update && sudo apt-get install tor tor-geoipdb
> ```
> 
> Some packages could not be installed. This may mean that you have
> requested an impossible situation or if you are using the unstable
> distribution that some required packages have not yet been created
> ...


What version of Ubuntu are you using ? from your sig is it 9.04 ? In that case you need to change "lucid" to "karmic" in your sources.list.

Other then that , the instructions worked flawlessly on my machine, there are a few additional steps ...

1. Do you have the universe / multiverse repos enabled ?

2. I highly suggest you follow the steps outlined here :

http://www.torproject.org/docs/debian.html.en
http://www.torproject.org/docs/tor-doc-unix.html.en

On the second link, skip step one (which was covered in the first link).

You will need to configure polipo and firefox, the second link has a third like to a polipo config file

https://svn.torproject.org/svn/torbr...ig/polipo.conf

----------


## Oxwivi

> Interesting you say that, then ask for assistance with customization.
> 
> If you compiled for source you will need to write a custom init script.


It's my first compilation, and I just followed the instructions. I'm a N00B Ubuntu user, but am used to using Tor how I like it. Anyway, don't need the init.d thing, it's fine the way it is. I was just wondering why it was like that since, as I said, I am new to the technical aspects.

Well, my friend installed it and configured it according to my instructions, but it looks like his network somehow recognises Tor and stop it from connecting. I made him do port scan, but even then the open ones (and only two are open - 8- and 443) refuse to work with Tor. Is there a workaround? I was thinking if it was possible to change the localhost from 127.0.0.1 - any ideas?

----------


## completely new

Hello, can someone help me with configuring Skype and Pidgin to work with Tor? Thanks.

----------


## houndi

This way you will not have any of the other person's junk on the computer, think of all the junk programs, files, and other settings that you may not want and how much time

----------


## pkjm17

> What version of Ubuntu are you using ? from your sig is it 9.04 ? In that case you need to change "lucid" to "karmic" in your sources.list.
> 
> Other then that , the instructions worked flawlessly on my machine, there are a few additional steps ...
> 
> 1. Do you have the universe / multiverse repos enabled ?


Yes, I'm using Lucid Lynx. 
For my sources list, this is what I have in it. (see screenshot)

Do I have the the universe / multiverse repos enabled? I think I did this when I first got Linux and installed it on my computer.

Maybe it has something to do with adding the key? This is my output from adding key.

pat@pat-desktop:~$ gpg --keyserver keys.gnupg.net --recv 886DDD89
gpg: requesting key 886DDD89 from hkp server keys.gnupg.net

gpg: key 886DDD89: "deb.torproject.org archive signing key" not changed
gpg: Total number processed: 1
gpg:              unchanged: 1
pat@pat-desktop:~$ gpg --export A3C4F0F979CAA22CDBA8F512EE8CBC9E886DDD89 | sudo apt-key add -
OK

----------


## rookcifer

> Do I have the the universe / multiverse repos enabled? I think I did this when I first got Linux and installed it on my computer.


Modern Ubuntu versions come out of the box with the multiverse/universe repos enabled by default.  So unless you disabled them for some reason, they should be enabled.




> Maybe it has something to do with adding the key? This is my output from adding key.
> 
> pat@pat-desktop:~$ gpg --keyserver keys.gnupg.net --recv 886DDD89
> gpg: requesting key 886DDD89 from hkp server keys.gnupg.net
> 
> gpg: key 886DDD89: "deb.torproject.org archive signing key" not changed
> gpg: Total number processed: 1
> gpg:              unchanged: 1
> pat@pat-desktop:~$ gpg --export A3C4F0F979CAA22CDBA8F512EE8CBC9E886DDD89 | sudo apt-key add -
> OK


Nope that looks completely normal.  

TBH, I have no idea what the problem here is.  I followed the steps on a fresh Lucid install and it worked perfectly.  I guess you should post your /etc/apt/sources.list here so we can verify your sources are right.

----------


## bodhi.zazen

> Thank you for the clear explanation.
> 
> I have been happy with Privoxy as I use it for adblock as well. Personally, in the past, I do not see a performance hit wit Privoxy nor a performance gain with polipo.
> 
> With that said, I will look at polipo again.


Brief update :

I installed TOR on Ubuntu 10.,04 and tested the speed of TOR without any proxy, with privoxy, and with polipo. Polipo was configured with and without adblocking.

The informal results are:

1. TOR without any proxy (just using socks 5 ) is the slowest by far.

2. Privoxy forwarding to socks5 (rather then socks 4 or 4a) is not appreciably faster or slower then polipo.

As a side note, although the mailing list discusses the caching features as an advantage, the defaults for polippo suggested by TOR disable the cache. If you look at the cache you will see why (the cache is certainly a privacy leak). Enabling the cache does not improve speed.

To reproduce this you can try yourself.

Install TOR, privoxy, and polipo. Configure privoxy and polipo to forward to TOR. Configure privoxy to use port 8118 and polipo 8123.

You can easily change your setting s in firefox between TOR , polipo, and privoxy and test load the following sites (these sites have diverse annoyances if you do not have adblock, nothing too bad mind you, but diverse):

http://linuxpoison.blogspot.com/
https://check.torproject.org/
http://www.ebaumsworld.com/

Note: That last site has lots of images and some popups if you do not add block, some images are NSFW (Not Safe for Work).

Note firefox optimzations (in about**:config )

network.http.max-persistent-connections-per-proxy   30
network.http.max-connections                        30
network.http.max-connections-per-server             30
network.http.max-persistent-connections-per-proxy   30
network.http.max-persistent-connections-per-server  30


network.http.pipelining              true
network.http.pipelining.maxrequests  10
network.http.pipelining.ssl          true
network.http.proxy.pipelining        true

IMO some of the information on TOR is a bit dated and honestly I could not appreciate a significant speed difference between privoxy and polipo  hitting those pages and reloading them across several proxies several times.

Testing was performed on a fresh install (plus all updates) of Ubuntu 10.04.1, no extensions in firefox (no adblockplus or NoScript).

The config file for polipo from TOR is tweaked, I advise you use it, but you should review it and understand the changes from the default settings.

Privoxy did not require much of a modification, just forwarding to a socks5 proxy of 9050.

IMO either polipo and privoxy work well, and improve performance on TOR significantly. I di dnot run into any major problems with either proxy, they both work well.

----------


## pkjm17

> Modern Ubuntu versions come out of the box with the multiverse/universe repos enabled by default.  So unless you disabled them for some reason, they should be enabled.
> 
> 
> 
> Nope that looks completely normal.  
> 
> TBH, I have no idea what the problem here is.  I followed the steps on a fresh Lucid install and it worked perfectly.  I guess you should post your /etc/apt/sources.list here so we can verify your sources are right.


This is the only thing that's in my /etc/apt/sources.list.Am I missing anything else in it?

deb http://deb.torproject.org/torproject.org lucid main
deb-src http://deb.torproject.org/torproject.org lucid main

----------


## Soul-Sing

> This is the only thing that's in my /etc/apt/sources.list.Am I missing anything else in it?
> 
> deb http://deb.torproject.org/torproject.org lucid main
> deb-src http://deb.torproject.org/torproject.org lucid main


Thats not ok. You could add these additional sources via software sources==> system===>management===>software sources.
You could check your other sources as well via software sources.

----------


## pkjm17

> I am amazed so many have such a hard time installing Tor.  It's really quite simple.  
> 
> First you need to add the Tor repo to your /etc/apt/sources.list.  Add the following lines (Ubuntu lucid users only):
> 
> 
> 
> ```
> deb http://deb.torproject.org/torproject.org lucid main
> deb-src http://deb.torproject.org/torproject.org lucid main
> ...


I was able to install Tor and Polipo, and got the Torbutton, however, when I have Tor enabled, and if I click on a link or type a link into the browser, nothing happens.It won't display the page. Any idea why?

----------


## mandragor

I recommend you take a look in the logfiles for both Tor and Polipo;
/var/log/tor/log
and
/var/log/polipo/polipo.log

Make sure they don't report any errors.

----------


## pkjm17

> I recommend you take a look in the logfiles for both Tor and Polipo;
> /var/log/tor/log
> and
> /var/log/polipo/polipo.log
> 
> Make sure they don't report any errors.


It looks there are errors in these log files:

/var/log/tor/log

Aug 21 14:37:53.159 [notice] We tried for 15 seconds to connect to '[scrubbed]' using exit 'Amunet3'. Retrying on a new circuit.
Aug 21 14:37:53.160 [notice] Tried for 125 seconds to get a connection to [scrubbed]:80. Giving up.

/var/log/polipo/polipo.log

Established listening socket on port 8118.
Established listening socket on port 8118.
Connect to www.singlesnet.com:80 failed: General SOCKS server failure
Couldn't read from client: Connection reset by peer

What do I do?

----------


## mandragor

Tor is failing for some reason, you can restart it and watch the logfile - there
might be a clue as to why.

Did you edit /etc/tor/torrc ?

Are you behind a restrictive firewall?

----------


## pkjm17

> Tor is failing for some reason, you can restart it and watch the logfile - there
> might be a clue as to why.
> 
> Did you edit /etc/tor/torrc ?
> 
> Are you behind a restrictive firewall?


No, I didn't do anything to /etc/tor/torrc. Am I supposed to add something in there?

Anyway, I finally Tor to work... I think I had Vidalia installed and it was probably causing it to fail. Interesting thing...some websites I visit, with Tor enabled, i.e Facebook or Yahoo, the site will be in a different language like German or another different language lol

----------


## StoicLion

Thanks, rookcifer.  

Your explanation was just what I needed.  I got through the first couple of steps (clumsily because I'm such a newbie to ubuntu) from the Tor site's installation instructions but I couldn't figure out how to change the polipo config file. It was opening up as a read-only version for me.  

So, thanks, you got me through it.  

- Stoic  





> I am amazed so many have such a hard time installing Tor.  It's really quite simple.  
> 
> First you need to add the Tor repo to your /etc/apt/sources.list.  Add the following lines (Ubuntu lucid users only):
> 
> 
> 
> ```
> deb http://deb.torproject.org/torproject.org lucid main
> deb-src http://deb.torproject.org/torproject.org lucid main
> ...

----------


## aboodk

> I am amazed so many have such a hard time installing Tor.  It's really quite simple.  
> 
> First you need to add the Tor repo to your /etc/apt/sources.list.  Add the following lines (Ubuntu lucid users only):
> 
> 
> 
> ```
> deb http://deb.torproject.org/torproject.org lucid main
> deb-src http://deb.torproject.org/torproject.org lucid main
> ...




Thank you rookcifer for your explanation, Although I am having a problem when trying to add the GPG key, this is the output that I get :

abood@abood-laptop:~$ gpg --keyserver keys.gnupg.net --recv 886DDD89
gpg: requesting key 886DDD89 from hkp server keys.gnupg.net
gpgkeys: HTTP fetch error 7: couldn't connect to host
gpg: no valid OpenPGP data found.
gpg: Total number processed: 0


I have also tried the mit.edu keyserver suggested previously but it gave me the same results.

BTW : I'm not sure if this is related but i'm using a 64 bit system.

----------


## jaysl

aboodk, have a look here, could be your firewall blocking.
http://ubuntuforums.org/showthread.php?t=1492290

My own problem is key not found.


```
$ gpg --keyserver keys.gnupg.net --recv 886DDD89
gpg: requesting key 886DDD89 from hkp server keys.gnupg.net
gpgkeys: key 886DDD89 not found on keyserver
gpg: no valid OpenPGP data found.
gpg: Total number processed: 0
```

I get the same using other servers.


```
$ gpg --keyserver pgp.mit.edu --recv 886DDD89
gpg: requesting key 886DDD89 from hkp server pgp.mit.edu
gpgkeys: key 886DDD89 not found on keyserver
gpg: no valid OpenPGP data found.
gpg: Total number processed: 0
```

Does anybody know why I'm getting key not found?

edit: I've now installed gui-apt-key and added the key through that no problem. No idea why it didn't work from the terminal with gpg.

----------


## sideshowmel

> First open a terminal and cut and paste this command:
> 
> 
> 
> ```
> sudo echo 'deb http://deb.torproject.org/torproject.org lucid main' > /etc/apt/sources.list && gpg --keyserver keys.gnupg.net --recv 886DDD89 && gpg --export A3C4F0F979CAA22CDBA8F512EE8CBC9E886DDD89 | sudo apt-key add - && sudo aptitude update && sudo aptitude install tor tor-geoipdb polipo
> ```
> 
> The above installs the official Tor project repo and adds their key.
> ...


DON'T DO THIS!!!!  I had to completely regenerate my sources.list file from scratch (see the > above where should be >>?).

----------


## bodhi.zazen

See this page :

http://bodhizazen.net/Tutorials/tor/

----------


## rookcifer

> DON'T DO THIS!!!!  I had to completely regenerate my sources.list file from scratch (see the > above where should be >>?).


Why would you need to do that?  If you don't want something there just open a text editor and remove it.  Or, better yet, just create a "tor.list" inside of /etc/apt/sources.list.d.  I should have probably done it that way when I made the little tutorial since this seems to be the new way things are done.

----------


## bodhi.zazen

> Why would you need to do that?  If you don't want something there just open a text editor and remove it.  Or, better yet, just create a "tor.list" inside of /etc/apt/sources.list.d.  I should have probably done it that way when I made the little tutorial since this seems to be the new way things are done.


I think the point is the diference between > an >>

If you use one > , it over writes the file. Two >> appends your file.

So your step "sudo echo 'deb http://deb.torproject.org/torproject.org lucid main'  > /etc/apt/sources.list"

The single > overwrites the entire file. Thus sources list needed to be restored.

Another small point, you can not 

"sudo echo 'deb http://deb.torproject.org/torproject.org lucid main'  > /etc/apt/sources.list" , sudo will not allow a redirect like this.

See this :



```
bodhi@lucid:~$ tail -n 1 /etc/apt/sources.list
deb http://deb.torproject.org/torproject.org lucid main

#See how your command fails?
bodhi@lucid:~$ sudo echo 'this fails' > /etc/apt/sources.list
bash: /etc/apt/sources.list: Permission denied

# Just to confirm that =)
bodhi@lucid:~$ tail -n 1 /etc/apt/sources.list
deb http://deb.torproject.org/torproject.org lucid main

# See how a single > overwrites the entire file ?
bodhi@lucid:~$ sudo bash -c "echo 'this works' > /etc/apt/sources.list"
bodhi@lucid:~$ tail -n 1 /etc/apt/sources.list
this works

# Ohhh Noooooo !!!!
bodhi@lucid:~$ cat /etc/apt/sources.list
this works
```

What you want is to use the bash -c trick I showed you or tee, but with a >> rather then a >



```
#This works
bodhi@lucid:~$ sudo bash -c "echo 'this works' >> /etc/apt/sources.list"
bodhi@lucid:~$ tail -n 3 /etc/apt/sources.list

deb http://deb.torproject.org/torproject.org lucid main
this works
```

Notice the redirect (bash -c) and two >> 

 :Twisted Evil:

----------


## rookcifer

> I think the point is the diference between > an >>
> 
> If you use one > , it over writes the file. Two >> appends your file.
> 
> So your step "sudo echo 'deb http://deb.torproject.org/torproject.org lucid main'  > /etc/apt/sources.list"
> 
> The single > overwrites the entire file. Thus sources list needed to be restored.
> 
> Another small point, you can not 
> ...



Yes, you're correct.  I made a boo boo here.  :Embarassed:   I have corrected it in my original post.  Instead of appending it to sources.list, I just made it so that it creates a new tor.list file in /etc/apt/sources.list.d.  If this is not satisfactory, let me know.

----------


## bodhi.zazen

> Yes, you're correct.  I made a boo boo here.   I have corrected it in my original post.  Instead of appending it to sources.list, I just made it so that it creates a new tor.list file in /etc/apt/sources.list.d.  If this is not satisfactory, let me know.


Not a problem, we all, or at least I have made my share of mistakes. I hope I pointed this out to you as educationally as possible.

Yes using /etc/apt/sources.list.d works and will likely become the preferred method, nice touch.

----------


## fisbike

Fifth, configure polipo:

Go to this link  and copy everything.  Then open /etc/polipo/config and delete  everything there.  Then replace it with what you just copied from the  above link (you will need to open the config file with sudo privs).

I wasnt able to do this step cause I cant delete everything in /etc/polipo/config and the delete word is greyed out.  How?

----------


## bodhi.zazen

> Fifth, configure polipo:
> 
> Go to this link  and copy everything.  Then open /etc/polipo/config and delete  everything there.  Then replace it with what you just copied from the  above link (you will need to open the config file with sudo privs).
> 
> I wasnt able to do this step cause I cant delete everything in /etc/polipo/config and the delete word is greyed out.  How?


You have to edit the file as root



```
gksu gedit /etc/polipo/config
```

Or you can use nano



```
sudo nano /etc/polipo/config
```

Or vim



```
sudo -e /etc/polipo/config
```

----------


## madmax75

I followed the instructions from the Tor website

https://www.torproject.org/docs/debian

https://www.torproject.org/docs/tor-...html.en#polipo

and it seems to be working just fine for me. No problems as far as I can tell.

Using 10.04.1 LTS

----------


## zaphodbblx

The problem I get is it cant seem to find the file to execute and I downloaded it through synaptic too

----------


## cariboo

Most executables are in /usr/bin, You can also find were an application is installed by going to Synaptic, highlight the package, and click Properties->Installed files.

----------


## zaphodbblx

why would a program I downloaded through synaptic loose parts of its self though. thats a first for me in 3 yrs of using Linux full time. thanks I will look there again though

----------


## justinjedlawton

> First open a terminal and cut and paste this command:
> 
> 
> 
> ```
> sudo echo 'deb http://deb.torproject.org/torproject.org lucid main' > /etc/apt/sources.list.d/tor.list && gpg --keyserver keys.gnupg.net --recv 886DDD89 && gpg --export A3C4F0F979CAA22CDBA8F512EE8CBC9E886DDD89 | sudo apt-key add - && sudo aptitude update && sudo aptitude install tor tor-geoipdb polipo
> ```
> 
> The above installs the official Tor project repo and adds their key.
> ...



i whent to the new conf. and it gave me a 404

----------


## sev1

I've read & reread the post and am having a different issue getting TOR to work. No problems with the install (TOR w/ Polipo - no Torbutton), but:

ss -aln | grep 9050 gets:  0      128                    127.0.0.1:9050

the ubuntu guide to setting up TOR says command should get one of the following:

0  0  :::950  :::*
0  0   *:950   *:*

Can anyone tell me if the fact that I'm getting '128' instead of '0' is causing the problem? Also, I've started, stopped, restarted TOR from 
terminal as suggested in the post, and I don't see it running in sys monitor. Why does TOR not seem to be running?

----------

