How to Install SmartDNS on Elementary OS Latest

SmartDNS is an open-source DNS server that allows you to block ads and malware, and access geo-restricted content. In this tutorial, we'll learn how to install SmartDNS on Elementary OS.

Prerequisites

Step 1: Update System

First, we need to update the system.

sudo apt update
sudo apt upgrade -y

Step 2: Install Dependencies

Next, we need to install some dependencies for SmartDNS.

sudo apt install build-essential libssl-dev libevent-dev -y

Step 3: Install SmartDNS

Now, we can download the SmartDNS source code and build it.

git clone https://github.com/pymumu/smartdns.git
cd smartdns
make
sudo make install

Step 4: Configure SmartDNS

By default, SmartDNS will listen on all interfaces on port 53. You can configure it by modifying the smartdns.conf file.

sudo nano /usr/local/etc/smartdns/smartdns.conf

Uncomment the following line to enable DNS caching.

cache-size 150

Step 5: Start SmartDNS

Finally, we can start the SmartDNS service.

sudo systemctl start smartdns
sudo systemctl enable smartdns

Conclusion

That's it! You've successfully installed SmartDNS on Elementary OS. You can now configure your DNS clients to use the IP address of your SmartDNS server.

If you want to self-host in an easy, hands free way, need an external IP address, or simply want your data in your own hands, give IPv6.rs a try!