How to add a custom DNS entry in UniFi
Published onby Iron (edited on )
Configuring a custom DNS entry in UniFi can significantly enhance your network management by allowing devices to resolve internal services efficiently.
Whether you manage a small home network or a large enterprise setup, this guide will help you set up custom DNS entries in UniFi.
Let's dive in!
Table of Contents
Why configure custom DNS entries?
DNS is crucial for translating human-readable domain names into IP addresses that machines can understand. In a UniFi network, setting up custom DNS entries can help you manage your internal network more effectively.
There are several benefits to configuring custom DNS entries in your UniFi network:
- Improved Network Management: Custom DNS entries allow for better management of internal resources.
- Faster Access to Local Services: Devices can quickly resolve names of local services, reducing the need for external DNS queries.
- Enhanced Security: By using custom DNS, you can control and monitor DNS queries, improving your network’s security posture.
Step-by-step guide
Access the UniFi Controller
-
Log in to Your UniFi Controller: Access your UniFi Controller either hosted by UniHosted or on your local network. Use your administrator credentials to log in.
-
Navigate to the Main Dashboard: Once logged in, you will see the main dashboard displaying an overview of your network’s performance and configurations.
Open the settings menu
-
Access Settings: Click on the gear icon located on the lower-left side of the interface to open the Settings menu.
-
Select Networks: From the Settings menu, select "Networks" to open the network settings page where you can configure various aspects of your network.
Edit network settings
- Locate Your Network: Identify the network (such as your primary LAN or a specific VLAN) where you want to configure the custom DNS entry.
- Edit Network: Click on the "Edit" button next to the network name to modify its settings.
Configure DHCP settings
- Scroll to DHCP Name Server: In the network settings, scroll down to the "DHCP Name Server" section.
- Add DNS Server IPs: Here, you can add the IP addresses of your preferred DNS servers. If you want to add a custom DNS entry, you need to have your own DNS server set up to resolve these entries.
Setting up a local DNS Server (optional)
If you do not have a local DNS server, you can set one up using software like Pi-hole or a dedicated DNS server like BIND.
Example with Pi-hole:
-
Install Pi-hole: Install Pi-hole on a dedicated device within your network. Pi-hole is a network-wide ad blocker that can also function as a DNS server.
-
Configure Pi-hole: Access the Pi-hole web interface and add your custom DNS entries under the "Local DNS Records" section.
-
Set Pi-hole as DHCP Name Server: In your UniFi Controller, set the DHCP Name Server to the IP address of your Pi-hole.
192.168.1.2 # Example Pi-hole IP address
Verify and Save
- Save the Configuration: After configuring the DNS settings, click "Save" to apply the changes.
- Restart Network Devices: To ensure that the new DNS settings take effect, restart the devices connected to your network.
Testing your custom DNS Entry
-
Open Command Prompt or Terminal: On any device connected to your network, open a command prompt (Windows) or terminal (macOS/Linux).
-
Use nslookup Command: Verify that your custom DNS entries are resolving correctly using the
nslookup
command. For example:nslookup customname.local
-
Check Results: The command should return the IP address assigned to your custom DNS entry if everything is configured correctly.
Final Thoughts
Adding custom DNS entries in UniFi allows you to streamline network management and improve accessibility to internal services. By following these steps, you can ensure that your network devices resolve names efficiently, enhancing the overall network experience.
At UniHosted, we make managing UniFi Controllers easy and efficient. For more advanced network configurations or dedicated support, explore our hosting services. Feel free to reach out to us to optimize your network management.
If you would like me to personally walk you through UniHosted, you can schedule a call with me here.
We host UniFi Controllers in the Cloud
Are you ready to take your UniFi Network to the next level? Deploy a UniFi Cloud Controller in minutes and manage your network from anywhere.
Free tier available
Get the best support
Join 1660+ customers
No credit card required