How to point to local dns server in Ubuntu 21.04?
by erik2282 from LinuxQuestions.org on (#5NBCG)
I've tried this:
https://phoenixnap.com/kb/ubuntu-dns-nameservers
But doesn't seem to work.
This is my netplan file:
Code:root@serrano:~# cat /etc/netplan/01-network-manager-all.yaml
# Let NetworkManager manage all devices on this system
network:
version: 2
renderer: networkd
ethernets:
eno1:
dhcp4: true
nameservers:
addresses: [10.20.1.1]Code:root@serrano:~# ping horchata
ping: horchata: Temporary failure in name resolution
root@serrano:~# ping google.com
PING google.com (142.250.138.101) 56(84) bytes of data.
64 bytes from 142.250.138.101: icmp_seq=1 ttl=102 time=9.19 ms
64 bytes from 142.250.138.101: icmp_seq=2 ttl=102 time=9.28 ms
^C
--- google.com ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 1000ms
rtt min/avg/max/mdev = 9.192/9.234/9.276/0.042 ms
Code:root@serrano:~# cat /etc/resolv.conf
# This file is managed by man:systemd-resolved(8). Do not edit.
#
# 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 .Code:root@serrano:~# resolvectl status
Global
Protocols: -LLMNR -mDNS -DNSOverTLS DNSSEC=no/unsupported
resolv.conf mode: stub
Link 2 (eno1)
Current Scopes: DNS
Protocols: +DefaultRoute +LLMNR -mDNS -DNSOverTLS DNSSEC=no/unsupported
Current DNS Server: 10.20.1.1
DNS Servers: 10.20.1.1I feel like I'm missing something super obvious. Any help?


https://phoenixnap.com/kb/ubuntu-dns-nameservers
But doesn't seem to work.
This is my netplan file:
Code:root@serrano:~# cat /etc/netplan/01-network-manager-all.yaml
# Let NetworkManager manage all devices on this system
network:
version: 2
renderer: networkd
ethernets:
eno1:
dhcp4: true
nameservers:
addresses: [10.20.1.1]Code:root@serrano:~# ping horchata
ping: horchata: Temporary failure in name resolution
root@serrano:~# ping google.com
PING google.com (142.250.138.101) 56(84) bytes of data.
64 bytes from 142.250.138.101: icmp_seq=1 ttl=102 time=9.19 ms
64 bytes from 142.250.138.101: icmp_seq=2 ttl=102 time=9.28 ms
^C
--- google.com ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 1000ms
rtt min/avg/max/mdev = 9.192/9.234/9.276/0.042 ms
Code:root@serrano:~# cat /etc/resolv.conf
# This file is managed by man:systemd-resolved(8). Do not edit.
#
# 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 .Code:root@serrano:~# resolvectl status
Global
Protocols: -LLMNR -mDNS -DNSOverTLS DNSSEC=no/unsupported
resolv.conf mode: stub
Link 2 (eno1)
Current Scopes: DNS
Protocols: +DefaultRoute +LLMNR -mDNS -DNSOverTLS DNSSEC=no/unsupported
Current DNS Server: 10.20.1.1
DNS Servers: 10.20.1.1I feel like I'm missing something super obvious. Any help?