We can simplify using the Tor network on our applications and browsers by setting up an onion router with a proxy server which will work as an interface of the network.
In This tutorial on our Ubuntu 20.04 we will:
- Install Privoxy the proxy server
- Set up Onion router
- Forward All Privoxy request to the Onion router
- Use Provixy as a Proxy for our apps.
Step1: Update Our Ubuntu Server
# apt update # apt upgrade
Step2: Installing Tor Network And Privoxy
# apt install tor # apt install privoxy # apt install net-tools # systemctl enable privoxy # systemctl enable tor
Check running daemons
# netstat -puntl Active Internet connections (only servers) Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name tcp 0 0 127.0.0.53:53 0.0.0.0:* LISTEN 467/systemd-resolve tcp 0 0 127.0.0.1:8118 0.0.0.0:* LISTEN 35322/privoxy tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 709/sshd: /usr/sbin tcp 0 0 127.0.0.1:9050 0.0.0.0:* LISTEN 34789/tor tcp 0 0 127.0.0.1:6010 0.0.0.0:* LISTEN 775/sshd: root@pts/ tcp6 0 0 ::1:8118 :::* LISTEN 35322/privoxy tcp6 0 0 :::22 :::* LISTEN 709/sshd: /usr/sbin tcp6 0 0 ::1:6010 :::* LISTEN 775/sshd: root@pts/ udp 0 0 127.0.0.53:53 0.0.0.0:* 467/systemd-resolve
Step3: Forward All Requests To The Onion Router
As we can see from the output of the netstat
command, Tor Damon listens to localhost port 9050, so we will forward all requests that come to the Privoxy server to the Tor.
Edit the Privoxy config file /etc/privoxy/config and set the listen-address to your server public IP-Address and add the forward to onion router line forward / 127.0.0.1:9050 .
with a dot at the end of the line.
# vim /etc/privoxy/config
~~~~
# listen-address [::1]:8118
#
listen-address 85.159.213.192:8118
forward / 127.0.0.1:9050 .
#
~~~~
Step4: Testing Your Network
Testing using Firefox web browser, as you can add the Privoxy proxy address and port
And to check your current public IP-Address, you can make a google search with the “What is my IP”. The result will be the Onion Network IP address. not yours, or your ubuntu server.