Steps to Follow to Set Up Your Own Name Servers
Access your Panel and go to the “Firewall” tab:
Select the firewall profile used on your name server (default in the default profile) and click the pencil icon to edit:
Click the + symbol to add a new rule, and a section will open where you can choose a template. Select the template called “Allow DNS.”
Then, click the “Submit” button to save the changes.
And finally, the ports 53 are now open.
Assign the New Profile to the Public IP
If you’ve created a new firewall profile, with the recent introduction of VPC private networks on the platform, you can assign the firewall profile to both the public interface and the private interface.
In this case, if you created a new profile for the DNS server ports, assign it to the server’s public interface in the network section.
Create a Second DNS Server
You might find that some providers won’t allow you to use two DNS servers with the same IP. A simple solution is to create a second server with very few resources and redirect the traffic from the second server to the first server. To do this, on the second server, add the following lines to the end of /etc/rc.local before exit 0:
/sbin/sysctl net.ipv4.ip_forward=1
/sbin/iptables -t nat -A PREROUTING -p tcp --dport 53 -j DNAT --to-destination First_Server_IP:53
/sbin/iptables -t nat -A PREROUTING -p udp --dport 53 -j DNAT --to-destination First_Server_IP:53
/sbin/iptables -t nat -A POSTROUTING -j MASQUERADE
Once the changes are made and the second server is restarted, you’ll have two servers with different IPs to use as name servers.
We hope we've helped you with this tutorial 🙂. Remember, if you have any questions about this or any other issue related to your servers at Clouding, don't hesitate to write to support@clouding.io. We're here for anything you need!