Per default, the DNS settings get set automatically and there is no way to change them (v184.108.40.206). This guide shows you how to replace connman's DNS with dnsmasq and setting your own DNS config.
Stop connman from managing DNS
If you don't have any DNS configured in /etc/resolv.conf anymore, you can't resolv any domains on the internet. It's smart to install a replacement for connman's DNS in advance. Otherwise you can temporarily solve that by executing echo "220.127.116.11" | devel-su tee /etc/resolv.conf
You need to add the
--nodnsproxy proxy flag to connmand. This can be done by runing
devel-su systemctl edit connman and pasting this into there:
devel-su systemctl restart connman.
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.
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
Permanently run dnsmasq on boot
devel-su systemctl enable --now dnsmasq to enable it permanently & start it now.
Install & configure unbound DNS server
Unbound is a full-fledge recursive DNS resolver. You should consider to not fetch from the root servers but forward your requests to another Server via DoT. Bind unbound to 127.0.0.1 to avoid access from outside.
More information can be found in ArchWiki.