Ade Malsasa Akbar contact
Senior author, Open Source enthusiast.
Monday, October 7, 2019 at 17:17

 (Ubuntu Bionic connected to the internet via Tor and it's easy to setup)

This simple tutorial will show you to install two privacy tools, The Onion Router (TOR) and Dnscrypt-Proxy, on Ubuntu Bionic Beaver. We will make use of existing Mozilla Firefox browser instead and just configure system wide proxy using Ubuntu System Settings. We do not install Tor Browser or any other additional stuffs to make everything simple for everybody. Okay, let's go!

Subscribe to UbuntuBuzz Telegram Channel to get article updates directly.


  • 1. Install Them
  • 2. Enable DNSCrypt
  • 3. Test Them
  • 4. Configure Permanently
  • 5. Final Testing
  • Bonus
  • Further Reading

1. Install Tor and DNSCrypt

Two commands below install Tor and dnscrypt-proxy programs into Ubuntu system:

$ sudo apt-get install tor
$ sudo apt-get install dnscrypt-proxy

2. Enable DNSCrypt & Change its Resolver

In a Terminal:
$ sudo systemctl start dnscrypt-proxy.service

Configure it: run command line to edit DNSCrypt configuration > you see there fvz-anyone as resolver > replace it with cisco as resolver > save. Final correct DNSCrypt configuration should look like below.

 (See line with ResolverName code)

3. Test Tor and DNSCrypt

Before configuring them permanently, we need to see if quick install above worked perfectly.

For Tor, run it from command line[1], set Ubuntu to proxy all applications at SOCKS point, and then go to website. Successful Tor connection will show Bootstrapped 100% done at Terminal and green onion Congratulations at browser. See below.

$ tor

 (All pictures above are large enough, simply click one to see it larger)

For DNSCrypt, it works if you get dnscrypt enabled! message to the output of the command line dig @ txt See below.

(See the white line)

Once both testings worked, you are ready to configure them permanently below.

4. Configure Tor and DNSCrypt Permanently

For Tor, you need to setup it runs every startup. For DNSCrypt, you need to change resolver to 'cisco' and force your system to use instead of resolver point.

Tor setup:
Run Startup Applications from start menu > add Name: Tor > add Command: tor > add Comment: The Onion Router > press OK > see picture below for example.

DNSCrypt setup:

Remove your resolvconf package[1] > remove your original resolv.conf file[2] >  create new resolv.conf file[3] > write it so Ubuntu system will always look at for resolving all DNS connections[4] > save. Final setup should give you /etc/resolv.conf always pointing to point where dnscrypt-proxy working in your Ubuntu system.

$ sudo apt-get remove resolvconf 

$ sudo rm -fv /etc/resolv.conf

$ sudo touch /etc/resolv.conf

Write these lines into that new file and save:
options edns0

Final output will be like this:

To revert back if you dislike the configuration, see official DNSCrypt guide link below.

5. Final Testing

Restart your Ubuntu computer and re-test both Tor and DNSCrypt like above with internet access.

For Tor, go to and make sure it shows green onion saying Congratulations.

For DNSCrypt, check /etc/resolv.conf[1] and make sure it doesn't change from, and run dig command again[2] but this time without @ anymore.

cat /etc/resolv.conf

dig txt


(This output means our Ubuntu system is already using as the point of DNS resolving, so we do not need to specify it anymore in dig command)

For DNS leak, see DNS Leak Test website and make sure the resolver appeared is only from OpenDNS LLC because we used cisco resolver above. That means your DNS is not leaked and that's good. But if the DNS resolver shown there is from your Internet Service Provider (ISP), then it is DNS leak, and that's not good.

Do you want latest Tor instead?

For your information, you above installed Tor from universe Ubuntu repository which does not provide latest Tor program. In fact, at the moment, Tor program from universe is still at version while actually latest Tor is already at Do you want latest Tor? If so, read Tor Project guide instead. You can also follow latest version announcements at Tor Blog.

Further Readings

I hope you find this guide useful!

This article is licensed under CC BY-SA 3.0.