How to Set up Quad 9 DNS on Ubuntu 16.04 and Ubuntu 17.10 Desktop

You may probably know the recently launched Quad 9 public DNS service, which is the product of collaboration between IBM, Packet Clearing House (PCH) and Global Cyber Alliance (GCA). It comes with security benefits in that known malicious domain names will be blocked, which is great for end users. Quad 9 website provides instructions for Windows and Mac users, but no Linux instructions is available. So in this tutorial we will see how to set up Quad9 DNS on Ubuntu 16.04/17.10, which is a beginner-friendly Linux distribution.

Quad 9 explains how DNS works and its security feature.

Of course, if you can change DNS server in your router, then you don’t need to do it on your computer, but my cheap router doesn’t support changing DNS in its web control panel.

How to Set up Quad 9 DNS on Ubuntu 16.04

Network Manager allows you to change DNS server and it’s very easy to do. On Ubuntu 16.04 desktop, click the Network Manager icon at the upper-right corner, then click Edit Connections.

quad 9 dns ubuntu 16.04

Select Wired Connection or Wireless Connection and click Edit button.

quad 9 dns server network manager

Then click IPv4 settings. (If you are using IPv6 network, then click IPv6 settings.) Change Method from Automatic (DHCP) to Automatic (DHCP) address only, which will prevent Network Manager from getting DNS server information from router. Then enter the IP address of Quad 9 DNS server in the DNS servers field. There are two IP addresses separated by comma (9.9.9.9,149.112.112.112). The first one is primary DNS server, the second one is backup DNS server. Then click Save.

automatic DHCP address only

Disconnect and then reconnect to your router. The changes will take effect.

How to Set up Quad 9 DNS on Ubuntu 17.10

The steps of changing DNS server on Ubuntu 17.10 is basically the same as on Ubuntu 16.04. Ubuntu 17.10 ships with Gnome 3 desktop environment so the process is a little bit different.

On Ubuntu 17.10 desktop, click the triangle at the upper-right corner, then select Wired Connected (or Wireless Connected) > Wired Settings ( or Wireless Settings).

quad 9 ubuntu 17.10

Next, click the cog icon to change settings.

quad 9 dns ubuntu

After that, click IPv4 tab (or IPv6 tab if you use IPv6). Toggle Automatic to OFF because we don’t want to obtain DNS server information from router. Then enter the IP address of Quad 9 DNS server in the DNS field. There are two IP addresses separated by comma (9.9.9.9,149.112.112.112). The first one is primary DNS server, the second one is backup DNS server. Then click Apply. 

quad 9 linux

Now toggle the network connection from ON to OFF, then back to ON. Your changes is now in effect.

quad 9 dns network manager

If you click the cog icon again, you can see the DNS server address.

quad 9 dns linux

DNS Test

How do you know you are actually using Quad 9 DNS service? Go to dnsleaktest.com. Start the test by clicking Extended Test button and wait for the result. The following screenshot shows my test result.

dns leak test

Note that Quad 9 uses a technique called anycast to route you DNS queries to the nearest DNS server operated by PCH. So you are not likely to see 9.9.9.9 or 149.112.112.112 in the test result, instead you will see DNS servers owned by pch.net, which indicates that you are using Quad 9 DNS service.

That’s it! I hope this tutorial helped you set up Quad 9 DNS on Ubuntu 16.04 and Ubuntu 17.10. As always, if you found this post useful, then subscribe to our free newsletter. Thanks for visiting!

Rate this tutorial
[Total: 8 Average: 4.3]

Leave a Comment

  • Comments with links are moderated by admin before published.
  • Your email address will not be published.
  • Use <pre> ... </pre> HTML tag to quote the output from your terminal/console.
  • If my answer helped you, please consider supporting this site. Thanks :)