Get the latest updates, in-depth tutorials, and exclusive resources on themes, templates, and code. Stay ahead with our expert insights—join our Telegram channel today!

Table of Content

How to Set Up Cloudflare DNS on Linux (Ubuntu/Debian-Based)

Learn how to set up Cloudflare DNS (1.1.1.1) on Linux (Ubuntu/Debian) for faster, private, and secure browsing. Step-by-step guide!

Cloudflare DNS (1.1.1.1) is a fast, secure, and privacy-focused DNS service that improves browsing speed and security. This guide will help you configure Cloudflare DNS on your Linux system, specifically for Ubuntu and Debian-based distributions.

Cloudflare DNS setup on Linux (Ubuntu/Debian)
Step-by-step guide to setting up Cloudflare DNS on Ubuntu and Debian-based Linux systems.

What is Cloudflare DNS?

DNS (Domain Name System) translates domain names into IP addresses. Your internet service provider (ISP) assigns a default DNS, but switching to Cloudflare’s DNS can enhance privacy, security, and speed.

Cloudflare DNS Addresses:

  • IPv4:
  • Preferred DNS: 1.1.1.1
  • Alternate DNS: 1.0.0.1
  • IPv6:
  • Preferred DNS: 2606:4700:4700::1111
  • Alternate DNS: 2606:4700:4700::1001

How to Set Up Cloudflare DNS on Linux (Ubuntu/Debian-Based)

Method 1: Using GUI (For Desktop Users)

  1. Open Network Settings:
  • Click on the Settings icon.
  • Select Network from the sidebar.
  1. Edit Your Connection:
  • Click on your active connection (Wi-Fi or Wired).
  • Click on the Settings (gear) icon.
  1. Change DNS Servers:
  • Go to the IPv4 tab.
  • Disable Automatic DNS.
  • Enter the following Cloudflare DNS servers:
    • 1.1.1.1, 1.0.0.1
  • (Optional) In the IPv6 tab, disable Automatic DNS and enter:
    • 2606:4700:4700::1111, 2606:4700:4700::1001
  1. Apply Changes:
  • Click Apply.
  • Disconnect and reconnect to the network for the changes to take effect.

Method 2: Using Terminal (For Advanced Users)

1. Modify the resolv.conf File (Temporary Method)

  1. Open the terminal (Ctrl + Alt + T).
  2. Type the following command:
   sudo nano /etc/resolv.conf
  1. Replace the existing nameservers with Cloudflare’s:
   nameserver 1.1.1.1
   nameserver 1.0.0.1
  1. Press Ctrl + X, then Y, and hit Enter to save the file.
  2. Restart the network service:
   sudo systemctl restart networking.service

Note: This method is temporary and resets on reboot.

2. Modify NetworkManager (Permanent Method)

  1. Open the NetworkManager configuration file:
   sudo nano /etc/NetworkManager/NetworkManager.conf
  1. Add or modify the [main] section to include:
   [main]
   dns=none
  1. Save and exit (Ctrl + X, then Y, and Enter).
  2. Now, edit the DNS configuration:
   sudo nano /etc/systemd/resolved.conf
  1. Uncomment and modify the DNS= line:
   DNS=1.1.1.1 1.0.0.1
  1. Restart NetworkManager:
   sudo systemctl restart NetworkManager

How to Verify Cloudflare DNS is Working

To check if your system is using Cloudflare DNS:

  1. Open the terminal and run:
   nslookup google.com
  1. If the output shows 1.1.1.1 or 1.0.0.1, Cloudflare DNS is active.
  2. Alternatively, visit https://1.1.1.1/help in your browser.

Why Use Cloudflare DNS?

Faster Browsing – Cloudflare DNS is one of the fastest in the world. ✅ Better Privacy – Cloudflare does not track or log your browsing data. ✅ Increased Security – Helps protect against phishing and cyber threats.

By following these steps, you can easily switch to Cloudflare DNS on your Ubuntu or Debian-based Linux system and enjoy a faster, safer, and more private internet experience!

Let us know in the comments if you have any questions or need further assistance.

My name is It Is Unique Official, and I write news articles on current threats and trending topics. I am based in Parbhani, Maharashtra, India.

Post a Comment

Please avoid spamming in the comment section; all comments are moderated by the admin for quality and relevance.