Step 1: Update Packages
sudo apt update sudo apt upgrade
Step 2: Install DNS Software
sudo apt install dnsmasq
Step 3: Configure DNSMasq
sudo nano /etc/dnsmasq.conf
domain-needed– Configures the DNS server to not forward names without a dot (.) or a domain name to upstream servers. Any names without a dot or domain stay in the local network.bogus-priv– Stop DNS server from forwarding local IP range reverse-lookup queries to upstream DNS servers. That prevents leaking of the local network to upstream servers.no-resolv– Stops reading the upstream nameservers from the /etc/resolv.conf file, relying instead on the ones in the DNSMasq configuration.
server=8.8.8.8 server=8.8.4.4 cache-size=1000 sudo systemctl restart dnsmasq sudo systemctl status dnsmasqReference site: https://phoenixnap.com/kb/raspberry-pi-dns-server
Reference site:
for client setting
….
dns: wg0 ip (ex. 10.0.0.1)