NetworkManager Issue

Change dns entry for a interface (append it):

resolvectl dns <interface> <dns-entry>

Commands i applied:

vim /etc/NetworkManager/system-connections/'Wired connection 1.nmconnection’

[connection]
id=Wired connection 1
uuid=92965f12-76d5-3f21-b364-32f6f7e3dc11
type=ethernet
autoconnect-priority=-999
interface-name=ens33
permissions=
timestamp=1693301793

[ethernet]
mac-address-blacklist=

[ipv4]
address1=192.168.1.9/24,192.168.1.1
dns=192.168.1.9;
dns-search=
ignore-auto-dns=true
ignore-auto-routes=true
method=manual
route1=0.0.0.0/0,192.168.1.1

[ipv6]
addr-gen-mode=stable-privacy
dns-search=
ignore-auto-dns=true
method=auto

[proxy]

Check Resolved:

systemd-resolve --status

root@k8snode:/etc/bind# systemd-resolve --status
Global
       LLMNR setting: no
MulticastDNS setting: no
  DNSOverTLS setting: no
      DNSSEC setting: no
    DNSSEC supported: no
         DNS Servers: 192.168.1.9
          DNSSEC NTA: 10.in-addr.arpa
                      16.172.in-addr.arpa
                      168.192.in-addr.arpa
                      17.172.in-addr.arpa
                      18.172.in-addr.arpa
                      19.172.in-addr.arpa
                      20.172.in-addr.arpa
                      21.172.in-addr.arpa
                      22.172.in-addr.arpa
                      23.172.in-addr.arpa
                      24.172.in-addr.arpa
                      25.172.in-addr.arpa
                      26.172.in-addr.arpa
                      27.172.in-addr.arpa
                      28.172.in-addr.arpa
                      29.172.in-addr.arpa
                      30.172.in-addr.arpa
                      31.172.in-addr.arpa
                      corp
                      d.f.ip6.arpa
                      home
                      internal
                      intranet
                      lan
                      local
                      private
                      test

Link 4 (br-b69c68987efe)
      Current Scopes: none
DefaultRoute setting: no
       LLMNR setting: yes
MulticastDNS setting: no
  DNSOverTLS setting: no
      DNSSEC setting: no
    DNSSEC supported: no

Link 3 (docker0)
      Current Scopes: none
DefaultRoute setting: no
       LLMNR setting: yes
MulticastDNS setting: no
  DNSOverTLS setting: no
      DNSSEC setting: no
    DNSSEC supported: no

Link 2 (ens33)
      Current Scopes: DNS
DefaultRoute setting: yes
       LLMNR setting: yes
MulticastDNS setting: no
  DNSOverTLS setting: no
      DNSSEC setting: no
    DNSSEC supported: no
  Current DNS Server: 192.168.1.9
         DNS Servers: 192.168.1.9
          DNS Domain: ~.

Configure now resolved :

sudo vim /etc/systemd/resolved.conf

[Resolve]
DNS=192.168.1.9
#FallbackDNS=
#Domains=
#LLMNR=no
#MulticastDNS=no
#DNSSEC=no
#DNSOverTLS=no
#Cache=no-negative
#DNSStubListener=yes
#ReadEtcHosts=yes

Most Important:

from this:

root@k8snode:/etc/bind# ls -l /etc/resolv.conf lrwxrwxrwx 1 root root 39 Apr 16 12:35 /etc/resolv.conf -> ../run/systemd/resolve/stub-resolv.conf

To this:

sudo ln -sf /run/systemd/resolve/resolv.conf /etc/resolv.conf

Last updated