Ir al contenido
  • +31 653-919-302
Cafayate.Net
  • 0
  • 0
  • Inicia sesión
  • Nederlands English (US) Español (AR)
  • Contáctanos
  • Inicio
  • Blog
  • Empleos
  • Contáctanos
Cafayate.Net
  • 0
  • 0
    • Inicio
    • Blog
    • Empleos
    • Contáctanos
  • +31 653-919-302
  • Nederlands English (US) Español (AR)
  • Inicia sesión
  • Contáctanos

ubuntu 16.10 dnsmasq troubleshoot

  • Todos los blogs
  • Tech Blog
  • ubuntu 16.10 dnsmasq troubleshoot
  • 5 de marzo de 2021 por
    Administrator

    Ok, so here’s what I’ve learned. Ubuntu uses systemd-resolved now for DNS stuff. However, if you want the DNS server from DHCP negotiation to be passed along to this service, you also need to use systemd-networkd to configure your interfaces. This means no NetworkManager, no resolvconf, no dnsmasq. Link Link Link

    Ok, so let’s switch to systemd-networkd:

    sudo systemctl enable systemd-networkd
    sudo systemctl disable NetworkManager
    sudo systemctl stop NetworkManager
    sudo systemctl start systemd-networkd

    I also need to create /etc/systemd/network/wired.network so that systemd-networkd knows what to do:

    [Match]
    Name=eth*
    [Network]
    DHCP=yes

    Finally, we need to set up this softlink so that systemd-resolved controls which DNS servers are used:

    sudo rm /etc/resolv.conf
    sudo ln -s /run/systemd/resolve/resolv.conf /etc/resolv.conf

    Ok, so. For whatever reason, systemd-resolved doesn’t properly resolve unqualified domains. I thought it might be because it was trying to do DNSSEC verification (which my router’s DNS server doesn’t support), but even when I allowed fallback, it still didn’t work. No idea what’s going on, but I have to assume it’s a bug in systemd-resolved.

    Having said that, I can still use systemd-networkd and systemd-resolved to control /etc/resolv.conf (i.e. have it point to my router’s DNS server). I just want things to skip trying to use systemd-resolved, so that means removing resolve from /etc/nsswitch.conf, so everything always falls back to DNS, which properly resolves my unqualified domains names:

    Before:

    hosts: files mdns4_minimal [NOTFOUND=return] resolve [!UNAVAIL=return] dns

    After:

    hosts: files mdns4_minimal [NOTFOUND=return] dns

    When nsswitch falls back to DNS, it properly resolves bruce. to its IP on my router’s subnet, not 127.0.0.1, so that’s good enough to fix this problem.

    Another alternative might be to have my router’s DNS server put all the names in a LAN domain, and configure systemd-resolved to try to append that domain…but I’m fed up.

    en Tech Blog
    How to remove docker from Ubuntu 16.04

    Diseñado para empresas

    Somos un equipo de personas apasionadas cuyo objetivo es mejorar la vida de todos a través de productos revolucionarios. Creamos grandes productos para resolver sus problemas empresariales. Nuestros productos están diseñados para pequeñas y medianas empresas dispuestas a optimizar su rendimiento.

    Contáctenos

    Plantexel
    Pedernera
    Salta Capital 
    Argenina

    • +31 653-919-302
    • [email protected]
    Síganos
    Copyright © Plantexel
    Nederlands | English (US) | Español (AR)