dnsmasq has been installed as a local DNS cache on Ubuntu and other Debian derivatives for many years. /etc/resolv.conf normally points at localhost.
You get on some distros by default something that that makes you subject to DNS amplification attacks.