Use dnsmasq for DNS
As the name already implies, dnsmasq is not a full-fledged DNS server. If you want a real, recursive DNS resolver, consider using unbound instead.
Install dnsmasq
dnsmasq is available on SailfishOS chum. You 1st need to add the 3rd-party-repo, afterwards running devel-su pkcon refresh && pkcon install dnsmasq
will install it.
Disable your current DNS handler
On a fresh installation, DNS is handled by connman. You can remove it with these instructions.
Permanently run dnsmasq on boot
Execute Execute devel-su systemctl enable --now dnsmasq
to enable it permanently & start it now.
Configure dnsmasq
dnsmasq's configuration lies under /etc/dnsmasq.conf
. You can get more information about its config options from dnsmasq's manpage and ArchWiki.