What is Tor? Tor is a free software and also an open network that helps you to defend your privacy and freedom. Tor will help you to be almost invisible to network traffic analysis. Tor is possible thanks to a a group of volunteers that work hardly donating bandwidth and network resources so all of us who use Tor can not be exposed to surveillance. With Tor you can have anonymous IP address, hostname and you can not be tracked at network or application level. What else do you need to know? Let’s install it.
Install TOR
We have to add the repository to install tor. For that, we need to create a new repo file in the yum.repos.d
folder. For that, issue the following command (Please note that you need to be root to edit this file)
1 |
nano /etc/yum.repos.d/torproject.repo |
Now, paste the following text into that file and save it
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
[tor] name=Tor repo enabled=1 baseurl=http://deb.torproject.org/torproject.org/rpm/el/7/$basearch/ gpgcheck=1 gpgkey=http://deb.torproject.org/torproject.org/rpm/RPM-GPG-KEY-torproject.org.asc [tor-source] name=Tor source repo enabled=1 autorefresh=0 baseurl=http://deb.torproject.org/torproject.org/rpm/el/7/SRPMS gpgcheck=1 gpgkey=http://deb.torproject.org/torproject.org/rpm/RPM-GPG-KEY-torproject.org.asc |
If you want to install tor in your other versions of fedora or centos or redhat, check the following table.
fedora 19 – fc/19
fedora 20 – fc/20
centos 6 – el/6
And reaplace “el/7” in the repo file with the corresponding one. (If you have Centos 7, then you don’t need to replace it – obviously )
Important Note: If you have epel.repo enabled in your system, then you should open that file ( /etc/yum.repos.d/epel.repo
) and edit it to add the following line to it.
Exclude=tor
Save the file.
Once the repo file is in position, we can simply install it by issuing
1 |
yum install tor |
Once the installation is finished, we can start the service by typing this command,
1 |
service tor start |
Check TOR has been running
1 |
netstat -taunp | grep LISTEN |
Output
1 2 3 4 5 |
tcp 0 0 127.0.0.1:25 0.0.0.0:* LISTEN 591/sendmail tcp 0 0 127.0.0.1:9050 0.0.0.0:* LISTEN 837/tor tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN 619/httpd tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 538/sshd tcp 0 0 :::22 :::* LISTEN 538/sshd |
Install Privoxy
First, you need to enable EPEL repository on your system. Type this command
1 |
rpm -Uvh http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm |
Install privoxy using this command
1 |
yum install privoxy -y |
Make a copy of the privoxy configuration file:
1 |
cp /etc/privoxy/config /etc/privoxy/config.original |
Configure privoxy and add this line to server /etc/privoxy/config
1 |
forward-socks5t / 127.0.0.1:9050 . |
Start the privoxy service.
1 |
service privoxy start |
Check privoxy has been running
1 |
netstat -taunp | grep LISTEN |
Output
1 2 3 4 5 6 |
tcp 0 0 127.0.0.1:25 0.0.0.0:* LISTEN 591/sendmail tcp 0 0 127.0.0.1:9050 0.0.0.0:* LISTEN 837/tor tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN 619/httpd tcp 0 0 127.0.0.1:8118 0.0.0.0:* LISTEN 1103/privoxy tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 538/sshd tcp 0 0 :::22 :::* LISTEN 538/sshd |
Check yours IP
1 2 3 4 5 6 7 8 9 |
curl -s http://whatismijnip.nl --proxy http://127.0.0.1:8118 |cut -d " " -f 5 OR curl -s http://ipecho.net/plain --proxy http://127.0.0.1:8118 |cut -d " " -f 5 OR curl --proxy http://127.0.0.1:8118 http://ipecho.net/plain; echo |
DONE
Source