Skip to content

Instantly share code, notes, and snippets.

@OnkelDom
Created November 21, 2022 20:21
Show Gist options
  • Select an option

  • Save OnkelDom/c753e7ff64442acd081c362773ad6c4e to your computer and use it in GitHub Desktop.

Select an option

Save OnkelDom/c753e7ff64442acd081c362773ad6c4e to your computer and use it in GitHub Desktop.

Revisions

  1. OnkelDom renamed this gist Nov 21, 2022. 1 changed file with 0 additions and 2 deletions.
    2 changes: 0 additions & 2 deletions gistfile1.txt → resolved.conf
    Original file line number Diff line number Diff line change
    @@ -1,8 +1,6 @@
    # Configure Systemd-Resolved
    $ sudo apt install -y systemd-resolved

    $ sudo vim /etc/systemd/timesyncd.conf

    $ cat <<EOF | sudo tee /etc/systemd/resolved.conf
    # This file is part of systemd.
    #
  2. OnkelDom created this gist Nov 21, 2022.
    39 changes: 39 additions & 0 deletions gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,39 @@
    # Configure Systemd-Resolved
    $ sudo apt install -y systemd-resolved

    $ sudo vim /etc/systemd/timesyncd.conf

    $ cat <<EOF | sudo tee /etc/systemd/resolved.conf
    # This file is part of systemd.
    #
    # systemd is free software; you can redistribute it and/or modify it
    # under the terms of the GNU Lesser General Public License as published by
    # the Free Software Foundation; either version 2.1 of the License, or
    # (at your option) any later version.
    #
    # Entries in this file show the compile time defaults.
    # You can change settings by editing this file.
    # Defaults can be restored by simply deleting this file.
    #
    # See resolved.conf(5) for details

    [Resolve]
    # Some examples of DNS servers which may be used for DNS= and FallbackDNS=:
    # Cloudflare: 1.1.1.1 1.0.0.1 2606:4700:4700::1111 2606:4700:4700::1001
    # Google: 8.8.8.8 8.8.4.4 2001:4860:4860::8888 2001:4860:4860::8844
    # Quad9: 9.9.9.9 2620:fe::fe
    DNS=1.0.0.1 1.1.1.1
    #FallbackDNS=
    #Domains=
    #DNSSEC=no
    #DNSOverTLS=no
    #MulticastDNS=yes
    #LLMNR=yes
    #Cache=yes
    DNSStubListener=no
    #DNSStubListenerExtra=
    #ReadEtcHosts=yes
    #ResolveUnicastSingleLabel=no
    EOF

    $ sudo systemctl restart systemd-resolved.service