Version: Next
Local DNS with Dnsmasq
important
This guide is for Ubuntu 20.04 or higher installed as host OS on a local cluster.
Set up DNS with Dnsmasq
important
Make sure you have an ip address and the domain you want to use ready.
We're going to be using dnsmasq so we can use wildcards.
First, install dnsmasq
sudo apt install dnsmasqNow let's update the DNS configuration
edit the file
/etc/dnsmasq.conf
and add to the end
# This option is also commented above in the file, but we add it to the end for ease of use.bind-interfaces# The line below comes from the domain you want to use and what ip you want to point it toaddress=/.onepanel.test/192.168.99.0Restart dnsmasq
sudo systemctl restart dnsmasqMake dnsmasq dns server reachable
First, install and enable
resolvconf
sudo apt-get install resolvconfsudo systemctl enable resolvconfsudo systemctl start resolvconf
Then, edit the /etc/resolvconf/resolv.conf.d/tail
file to make sure we keep the 127.0.0.53
nameserver.
nameserver 127.0.0.53
Make sure the changes persist
sudo resolvconf --enable-updates
sudo resolvconf -u
Finally, reboot your machine.