Tag: dns resolver

  • Disable systemd-resolved on Ubuntu/Deb/CentOS

    systemd-resolved provide DNS resolver facility in newer version of Linux servers running systemd.

    I prefer manually editing /etc/resolv.conf and add resolvers. If you are running your own DNS server, then you need to disable systemd-resolved as it listen on port 53, with out disabling the service, you can’t start your DNS server.

    To disable systemd-resolved, run

    wget https://raw.githubusercontent.com/serverok/server-setup/master/tools/disable-systemd-resolved.sh
    bash disable-systemd-resolved.sh
    

    Or do the following.

    systemctl disable systemd-resolved.service
    systemctl stop systemd-resolved
    

    Now create /etc/resolv.conf file

    rm -f /etc/resolv.conf
    tee /etc/resolv.conf << END
    nameserver 8.8.8.8
    nameserver 1.1.1.1
    END
    

    See resolv.conf, dns

  • Install Unbound DNS caching server

    Unbound is an Open source DNS caching and recursive resolver. You can find more about unbound at

    https://nlnetlabs.nl/projects/unbound/about/

    To install unbound on Ubuntu/Debian, run

    apt install unbound
    

    To start unbound

    systemctl start unbound
    

    Set unbound to start on boot

    systemctl enable unbound
    

    To configure your server to use local name servers provided by unbound, edit file

    vi /etc/resolv.conf
    

    Add

    nameserver 127.0.0.1
    

    See dns

  • DNS Resolver

    CloudFlare announced privacy-first consumer DNS service.

    IP of CloudFlare public DNS servers are

    1.1.1.1
    1.0.0.1
    

    So far i was using Google Public DNS servers as my resolver.

    8.8.8.8
    8.8.4.4
    

    Quad9

    Quad9 is from IMB and Global Cyber Allience.

    https://www.quad9.net

    9.9.9.9
    

    Other public DNS server is OpenDNS

    208.67.222.222
    208.67.220.220
    

    All these DNS servers have good connectivity in india. I get ~65 ping to these serves, that is normal for indian servers.

    On linux you can configure DNS server by editing file

    vi /etc/resolv.conf
    

    Add

    nameserver 1.1.1.1
    nameserver 8.8.8.8
    nameserver 9.9.9.9