« Ubuntu : Configurer les serveurs DNS » : différence entre les versions
De www.yakakliker.org
(Page créée avec « * Editer le fichier '''/etc/systemd/resolved.conf''' <syntaxhighlight lang="bash"> [Resolve] DNS=4.2.2.4 4.2.2.2 209.244.0.4 209.244.0.3 </syntaxhighlight> * Relancer le service <syntaxhighlight lang="bash"> systemctl restart systemd-resolved.service </syntaxhighlight> == Liens == https://forum.ubuntu-fr.org/viewtopic.php?id=2074877 ») |
Balises : Révocation manuelle Éditeur visuel |
||
| (5 versions intermédiaires par le même utilisateur non affichées) | |||
| Ligne 2 : | Ligne 2 : | ||
<syntaxhighlight lang="bash"> | <syntaxhighlight lang="bash"> | ||
# 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. Local configuration | |||
# should be created by either modifying this file, or by creating "drop-ins" in | |||
# the resolved.conf.d/ subdirectory. The latter is generally recommended. | |||
# Defaults can be restored by simply deleting this file and all drop-ins. | |||
# | |||
# Use 'systemd-analyze cat-config systemd/resolved.conf' to display the full config. | |||
# | |||
# See resolved.conf(5) for details. | |||
[Resolve] | [Resolve] | ||
DNS= | # Some examples of DNS servers which may be used for DNS= and FallbackDNS=: | ||
# Cloudflare: 1.1.1.1#cloudflare-dns.com 1.0.0.1#cloudflare-dns.com 2606:4700:4700::1111#cloudflare-dns.com 2606:4700:4700::1001#cloudflare-dns.com | |||
# Google: 8.8.8.8#dns.google 8.8.4.4#dns.google 2001:4860:4860::8888#dns.google 2001:4860:4860::8844#dns.google | |||
# Quad9: 9.9.9.9#dns.quad9.net 149.112.112.112#dns.quad9.net 2620:fe::fe#dns.quad9.net 2620:fe::9#dns.quad9.net | |||
DNS=192.168.1.1 | |||
FallbackDNS=192.168.1.2 | |||
Domains=yakakliker.org | |||
#DNSSEC=no | |||
#DNSOverTLS=no | |||
#MulticastDNS=no | |||
#LLMNR=no | |||
#Cache=no-negative | |||
#CacheFromLocalhost=no | |||
#DNSStubListener=yes | |||
#DNSStubListenerExtra= | |||
#ReadEtcHosts=yes | |||
#ResolveUnicastSingleLabel=no | |||
</syntaxhighlight> | </syntaxhighlight> | ||
| Ligne 10 : | Ligne 42 : | ||
<syntaxhighlight lang="bash"> | <syntaxhighlight lang="bash"> | ||
systemctl restart systemd-resolved.service | systemctl restart systemd-resolved.service | ||
</syntaxhighlight> | |||
==== Exemple de configuration avec NextDNS ==== | |||
<syntaxhighlight lang="bash"> | |||
[Resolve] | |||
DNS=45.90.28.0#dc3922.dns.nextdns.io | |||
DNS=2a07:a8c0::#dc3922.dns.nextdns.io | |||
DNS=45.90.30.0#dc3922.dns.nextdns.io | |||
DNS=2a07:a8c1::#dc3922.dns.nextdns.io | |||
DNSOverTLS=yes | |||
</syntaxhighlight> | </syntaxhighlight> | ||
== Liens == | == Liens == | ||
https://forum.ubuntu-fr.org/viewtopic.php?id=2074877 | https://forum.ubuntu-fr.org/viewtopic.php?id=2074877 | ||
[[Catégorie:Ubuntu]] | |||
[[Catégorie:Linux]] | |||
[[Catégorie:DNS]] | |||
[[Catégorie:Reseau]] | |||
Dernière version du 26 novembre 2025 à 10:50
- Editer le fichier /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. Local configuration
# should be created by either modifying this file, or by creating "drop-ins" in
# the resolved.conf.d/ subdirectory. The latter is generally recommended.
# Defaults can be restored by simply deleting this file and all drop-ins.
#
# Use 'systemd-analyze cat-config systemd/resolved.conf' to display the full config.
#
# 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#cloudflare-dns.com 1.0.0.1#cloudflare-dns.com 2606:4700:4700::1111#cloudflare-dns.com 2606:4700:4700::1001#cloudflare-dns.com
# Google: 8.8.8.8#dns.google 8.8.4.4#dns.google 2001:4860:4860::8888#dns.google 2001:4860:4860::8844#dns.google
# Quad9: 9.9.9.9#dns.quad9.net 149.112.112.112#dns.quad9.net 2620:fe::fe#dns.quad9.net 2620:fe::9#dns.quad9.net
DNS=192.168.1.1
FallbackDNS=192.168.1.2
Domains=yakakliker.org
#DNSSEC=no
#DNSOverTLS=no
#MulticastDNS=no
#LLMNR=no
#Cache=no-negative
#CacheFromLocalhost=no
#DNSStubListener=yes
#DNSStubListenerExtra=
#ReadEtcHosts=yes
#ResolveUnicastSingleLabel=no
- Relancer le service
systemctl restart systemd-resolved.service
Exemple de configuration avec NextDNS
[Resolve]
DNS=45.90.28.0#dc3922.dns.nextdns.io
DNS=2a07:a8c0::#dc3922.dns.nextdns.io
DNS=45.90.30.0#dc3922.dns.nextdns.io
DNS=2a07:a8c1::#dc3922.dns.nextdns.io
DNSOverTLS=yes