I want to set up a local Dynamic DNS (DDNS) server for the workstations in my office's local network without serving DHCP. The domains of the workstations end with .office.internal. Optionally, the domains other than *.office.internal can be resolved by upstream server dns.usc.edu. In addition, it would be better to be lightweight and easy to configure. I do not want to use dnsmasq because it requires to set up DHCP. What is the best choice of the DNS server other than dnsmasq that meets my requirements? How to configure it to do so?
Assistant
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.
Based on your requirements, I recommend using PowerDNS Recursor or Bind9 (named). Here's a detailed guide for PowerDNS Recursor, which is lightweight and flexible:
PowerDNS Recursor Installation and Configuration:
Install PowerDNS Recursor:
bash
# On Ubuntu/Debian
sudo apt-get install pdns-recursor
# On CentOS/RHEL
sudo yum install pdns-recursor
Configuration file (/etc/powerdns/recursor.conf):
ini
# Listen on all interfaces
local-address=0.0.0.0
local-port=53
# Static DNS entries for .office.internal
local-zone: "office.internal." static
# Add static entries
record-cache-size=0
negative-cache-ttl=0
# Upstream DNS server
forward-zones+=office.internal=
forward-zones-recurse+=.=dns.usc.edu
Manual DNS entries (/etc/powerdns/local.d/office.internal.zone):
code
pc1.office.internal. IN A 192.168.1.10
pc2.office.internal. IN A 192.168.1.11
printer.office.internal. IN A 192.168.1.100
Restart the service:
bash
sudo systemctl restart pdns-recursor
Alternative: Bind9 Configuration
bash
# Install
sudo apt-get install bind9
# /etc/bind/named.conf.local
zone "office.internal" {
type master;
file "/etc/bind/zones/db.office.internal";
};
# /etc/bind/named.conf.options
options {
forwarders {
dns.usc.edu;
};
};
# /etc/bind/zones/db.office.internal
$TTL 604800
@ IN SOA ns.office.internal. admin.office.internal. (
2023060101 ; Serial
604800 ; Refresh
86400 ; Retry
2419200 ; Expire
604800 ) ; Negative Cache TTL
@ IN NS ns.office.internal.
ns IN A 192.168.1.1
pc1 IN A 192.168.1.10
pc2 IN A 192.168.1.11
Recommendation: PowerDNS Recursor
Lightweight
Easy configuration
No DHCP requirement
Flexible forwarding
Good performance
Considerations:
Ensure firewall allows DNS traffic (UDP/TCP port 53)
Test resolution with dig or nslookup
Adjust IP addresses to match your network
Choose based on your specific network requirements and familiarity.