Setting up an Upstream DNS for external DNS resolution

I am testing promtail loki grafana logging and have set up my grafana as external device (not with maas). My MAAS has DHCP and DNS enabled. And I read this and set it up as described to reach my grafana.
My router gives grafana the IP:192.168.178.55 which I can reach from the test-minipc-1 but not by hostname.
If I ping the hostname grafana from my device, I can resolve it. But i can’t from the MAAS deployed one test-minipc-1.

I added the nameserver to netplan but still no resolve.

ubuntu@test-minipc-1:~$ cat /etc/resolv.conf
# This is /run/systemd/resolve/stub-resolv.conf managed by man:systemd-resolved(8).
# Do not edit.
#
# This file might be symlinked as /etc/resolv.conf. If you're looking at
# /etc/resolv.conf and seeing this text, you have followed the symlink.
#
# This is a dynamic resolv.conf file for connecting local clients to the
# internal DNS stub resolver of systemd-resolved. This file lists all
# configured search domains.
#
# Run "resolvectl status" to see details about the uplink DNS servers
# currently in use.
#
# Third party programs should typically not access this file directly, but only
# through the symlink at /etc/resolv.conf. To manage man:resolv.conf(5) in a
# different way, replace this symlink by a static file or a different symlink.
#
# See man:systemd-resolved.service(8) for details about the supported modes of
# operation for /etc/resolv.conf.

nameserver 127.0.0.53
options edns0 trust-ad
search maas
ubuntu@test-minipc-1:~$ resolvectl status
Global
       Protocols: -LLMNR -mDNS -DNSOverTLS DNSSEC=no/unsupported
resolv.conf mode: stub

Link 2 (enp1s0)
    Current Scopes: DNS
         Protocols: +DefaultRoute +LLMNR -mDNS -DNSOverTLS DNSSEC=no/unsupported
Current DNS Server: 192.168.178.70
       DNS Servers: 192.168.178.70 192.168.178.1
        DNS Domain: maas

Link 3 (wlp2s0)
Current Scopes: none
     Protocols: -DefaultRoute +LLMNR -mDNS -DNSOverTLS DNSSEC=no/unsupported

Link 4 (docker0)
Current Scopes: none
     Protocols: -DefaultRoute +LLMNR -mDNS -DNSOverTLS DNSSEC=no/unsupported
ubuntu@test-minipc-1:~$ cat /etc/netplan/50-cloud-init.yaml 
# This file is generated from information provided by the datasource.  Changes
# to it will not persist across an instance reboot.  To disable cloud-init's
# network configuration capabilities, write a file
# /etc/cloud/cloud.cfg.d/99-disable-network-config.cfg with the following:
# network: {config: disabled}
network:
    ethernets:
        enp1s0:
            addresses:
            - 192.168.178.139/24
            routes:
              - to: default
                via: 192.168.178.1
            match:
                macaddress: 7c:83:34:e0:cd:ab
            mtu: 1500
            nameservers:
                addresses:
                - 192.168.178.70
                - 192.168.178.1
                search:
                - maas
            set-name: enp1s0
            wakeonlan: true
    version: 2
ubuntu@test-minipc-1:~$ ping grafana
ping: grafana: Temporary failure in name resolution
ubuntu@test-minipc-1:~$ ping 192.168.178.55
PING 192.168.178.55 (192.168.178.55) 56(84) bytes of data.
64 bytes from 192.168.178.55: icmp_seq=1 ttl=64 time=15.1 ms
64 bytes from 192.168.178.55: icmp_seq=2 ttl=64 time=2.97 ms
64 bytes from 192.168.178.55: icmp_seq=3 ttl=64 time=3.48 ms
^C
--- 192.168.178.55 ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2003ms
rtt min/avg/max/mdev = 2.972/7.197/15.138/5.618 ms

How can i make my MAAS deployed device to resolve hostnames from upstream dns?

Hi @novski

Sorry, for a late reply. Were you able to solve your problem?

You are mentioning Upstream DNS, but can you provide your upstream DNS configuration?
Does dig @upstream grafana works?