Introduction
It should be trivial to understand by now that privacy and anonymity is an absolute must in the current age of everything being on the Internet, from the bank/school documents to personal photos to social media.
Also, being on Tor network, unlocks the world of Dark web to be explored, which is bigger than all the websites a common person might have visited in a lifetime, called the surface web.
Tor, The Onion Routing project, is the pioneer of freedom in the world of Internet.
Tor can be used to
Defend yourself against tracking and surveillance. Circumvent censorship
Tor Relay Network is a great way of staying anonymous over the Internet because on this network the traffic gets directed through a free, community driven, overlay network consisting of 6 thousand relays.
In this article I will explain how I used a Raspberry Pi to help route all the traffic on my iPhone through the Tor network, helping me secure my internet traffic on the device I use the most, from banking to social media!
Also, I’ll do the same for Macbook, which is the system on which I work!
Steps
Here, Raspberry Pi 3 would be used the proxy server through which the network is going to be routed.
-
Setup the raspberry Pi in any preferred way, I would suggest installing Raspbian OS.
-
Install
tor
usingsudo apt-get install tor
-
Configure tor:
Edittorrc
file:sudo vim /etc/tor/torrc
- Most of the line would be commented out, but uncomment and make changes to the following lines:
SocksPort 0.0.0.0:9100
You can configure SockPolicy, DataDirectory, etc as required. - Now reload the configs using
sudo systemctl daemon-reload
- Restart the service
sudo systemctl restart tor@default.service
-
Now you can use tor on macbook easily configuring proxy option in the settings. This is going to be a socks5 proxy.
If you want to setup tor routing only on Mac then you are good to go. You don’t need to follow further steps. Now all of your traffic would be routed though the tor socks 5 proxy on the RPI which is present on your local network. (the IP of RPI is 192.168.0.106 and port is 9100 as set in step 3.2).
-
iPhone does not allow routing traffic though socks 5 proxy, hence we need a HTTP proxy on top of the tor socks 5 proxy. For that we will be using polipo
- Install polipo on pi using
sudo apt-get install polipo
- Configure its config:
sudo /etc/polipo/config
- Change the following items in the config:
diskCacheRoot = " " # to avoid caching data on local system allowedClients = 127.0.0.1, 192.168.0.0/24 # Expose your network (modify accordingly) socksParentProxy = "localhost:9100" socksProxyType = socks5 proxyAddress = "0.0.0.0" # IPv4 only
- Now you need to put IP of the RPI and port 8123 in the
manual
proxy setting. You can reach there by going to settings –> wifi –> select your connected wifi –> go to the bottom and clickConfigure Proxy
–> SelectManual
–> Save.
- Install polipo on pi using
Conclusion
Now you are ready to explore internet with peace of mind that anonymity can provide. Please do cross check once that you were indeed able to configure tor well by visiting this link https://check.torproject.org/ . You should ideally see something like this :)