In this tutorial, we will guide you through the process of installing SmartDNS on Ubuntu Server latest. SmartDNS is a local DNS server that enables you to specify a specific DNS server for different domain names.
Before proceeding, ensure that you have the following requirements:
Before installing SmartDNS, update your Ubuntu system with the latest updates and packages. Execute the following command to update the package list and upgrade the system:
$ sudo apt-get update && sudo apt-get upgrade
SmartDNS requires some dependencies to install and run correctly. Execute the following command to install the dependencies:
$ sudo apt-get install -y gcc make wget dnsutils net-tools
We will download the SmartDNS package from GitHub and compile it on our Ubuntu server. Execute the following commands to download and install SmartDNS:
$ wget https://github.com/pymumu/smartdns/archive/master.zip
$ unzip master.zip
$ cd smartdns-master
$ make && sudo make install
Once installed, we need to create a configuration file for SmartDNS, so it knows which DNS server to use for which domain. Execute the following command to create a configuration file:
$ sudo nano /usr/local/etc/smartdns/smartdns.conf
In this file, we will add our DNS servers. Replace DNS_SERVER_IP
with the IP address of the desired DNS server:
server {
nameserver DNS_SERVER_IP # Replace with your IP address
name github.com # Replace with your domain name
}
Save and close the file by pressing CTRL+X
, Y
, and then ENTER
.
Execute the following command to start SmartDNS:
$ sudo systemctl start smartdns
To ensure that SmartDNS is working correctly, execute the following command to check the github.com
domain:
$ nslookup github.com 127.0.0.1
If everything is working correctly, the DNS server specified in smartdns.conf
will resole github.com
instead of the default DNS server.
In conclusion, we have successfully installed and configured SmartDNS on Ubuntu Server latest. You can now customize your SmartDNS server according to your needs.
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!
Alternatively, for the best virtual desktop, try Shells!