How to Install and Use Tor Network in Your Web Browser

Channel: Web Browsers Security Linux
Abstract: //deb.torproject.org/torproject.org/rpm/RPM-GPG-KEY-torproject.org.asc [tor-source] name=Tor source repo enabled=1 autorefresh=0 baseurl=httpsuse thes

Privacy Online is becoming a big deal and concerned Internet users are continuously looking for effective methods or tools for surfing the web anonymously for one reason or the other.

By surfing anonymously, no can easily tell who you are, where you’re connecting from or what sites you are visiting. This way, you can share sensitive information over public networks without compromising your privacy.

The Tor network is a group of volunteer-operated servers that allows people to enhance their privacy and security while connected to the Internet.

In this article, we will show how to install Tor (the anonymizing overlay network for TCP) software and configure your web browser (Firefox and Chrome) to use it as a proxy.

Installing Tor in Linux Systems

It is highly recommended to install the Tor package from the official project repository for reasons of stability and security fixes. DO NOT use the packages in the native repositories of Linux distributions, because they are frequently out of date. Follow the instructions below to set up an official package repository on your system.

Install Tor on Debian/Ubuntu

First, you need to find out the name of your distribution using the following command.

$ lsb_release -c

Next, add the following entries to /etc/apt/sources.list file. Make sure to replace DISTRIBUTION with your actual distribution name such as xenial):

deb https://deb.torproject.org/torproject.org DISTRIBUTION main deb-src https://deb.torproject.org/torproject.org DISTRIBUTION main

Then add the gpg key used to sign the packages by executing the following commands.

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

Next, update your software packages sources and install the Tor by issuing the following commands.

$ sudo apt update
$ sudo apt install deb.torproject.org-keyring
$ sudo apt install tor

Once you have successfully installed Tor, the service should be automatically started and enabled. You can use the systemctl command to verify its status.

$ sudo systemctl status tor

Otherwise, use these commands to start and enable it.

$ sudo systemctl start tor
$ sudo systemctl enable tor
Install Tor on CentOS/RHEL & Fedora

First, you need to find out the name of your distribution using the following command.

# cat /etc/redhat-release

Next, add the following entries to /etc/yum.repos.d/tor.repo file, and make sure to replace DISTRIBUTION name with one of the following: fc/29, el/7, or el/76 according to your distribution.

[tor]
name=Tor repo
enabled=1
baseurl=https://deb.torproject.org/torproject.org/rpm/DISTRIBUTION/$basearch/ gpgcheck=1 gpgkey=https://deb.torproject.org/torproject.org/rpm/RPM-GPG-KEY-torproject.org.asc [tor-source] name=Tor source repo enabled=1 autorefresh=0 baseurl=https://deb.torproject.org/torproject.org/rpm/DISTRIBUTION/SRPMS gpgcheck=1 gpgkey=https://deb.torproject.org/torproject.org/rpm/RPM-GPG-KEY-torproject.org.asc

Next, update your software packages sources and install the Tor by issuing the following commands.

# yum update
# yum install tor

Once Tor installed, you can start, enable and verity the status using following commands.

# systemctl start tor
# systemctl enable tor
# systemctl status tor
Configure Web Browser To Use Tor Network

To Torify your web browser, you need to use SOCKS directly by pointing your web browser at Tor (localhost port 9050). To confirm that tor is listening on this port, run the following netstat command.

$ sudo netstat -ltnp | grep "tor"

tcp        0      0 127.0.0.1:9050          0.0.0.0:*               LISTEN      15782/tor
Configure Tor on Firefox

Go to Preferences → Under Network Settings → Settings, under Configure Proxy Access to the Internet, select the option Manual proxy configuration.

Then set the SOCKS Host to 127.0.0.1 and Port to 9050 and check the option Proxy DNS when using SOCKS v5 and click OK.

Use Tor Network in Firefox

The next step is to test if your browser has been successfully torified by visiting the link: check.torproject.org. If you see the message in the screenshot below, it means a correct configuration.

Check Firefox Using Tor Network Configure Tor on Chrome

Go to Settings → Under Advanced, click on Privacy and Security, then under System, click on Open proxy settings.

Chrome Proxy Configuration

If your desktop environment is not supported or there was a problem launching your system configuration, you need to enable the proxy settings from the command line using the google-chrome-stable tool using the --proxy-server option.

$ google-chrome-stable --proxy-server="socks://127.0.0.1:9050"
Enable Chrome Proxy Support in Linux

The above command will launch a new window in existing browser session, use it to test whether Chrome has been torified (as shown before).

Attention: If you want to use Tor for more effective anonymous web browsing, please install and use the Tor Browser.

In this article, we have shown how to install Tor and configure your web browser to use it as a proxy. Keep in mind that Tor can not solve all anonymity problems. It only aims to protect the transport of data from one end to another. If you have any thoughts to share or questions, use the comment form below.

Ref From: tecmint

Related articles