Популярное

Музыка Кино и Анимация Автомобили Животные Спорт Путешествия Игры Юмор

Интересные видео

2025 Сериалы Трейлеры Новости Как сделать Видеоуроки Diy своими руками

Топ запросов

смотреть а4 schoolboy runaway турецкий сериал смотреть мультфильмы эдисон
dTub
Скачать

Why does /etc/resolv.conf point at 127.0.0.53 in Linux?

Автор: Slap Ya Administrator

Загружено: 2023-10-27

Просмотров: 6435

Описание:

Why does /etc/resolv.conf point at 127.0.0.53 in Linux?

This problem is likely caused by systemd-resolved which is running as a service on your system.

Here is the reason why

systemd-resolved dynamically generates two configuration files for potential use by DNS client libraries, like the BIND DNS client library in C libraries:

/run/systemd/resolve/stub-resolv.conf: This file instructs DNS client libraries to send their queries to 127.0.0.53, which is where the systemd-resolved process listens for DNS queries before forwarding them.

/run/systemd/resolve/resolv.conf: This file tells DNS client libraries to send their queries to IP addresses obtained by systemd-resolved on-the-fly from its configuration files and DHCP lease information. This bypasses systemd-resolved's forwarding step but also skips its logic for making complex forwarding decisions based on each transaction.

In both cases, systemd-resolved configures a search list of domain name suffixes derived on-the-fly from its configuration files and DHCP leases.

The /etc/resolv.conf file can be configured as:

A symbolic link to either of the above-mentioned files.
A symbolic link to a package-supplied static file at /usr/lib/systemd/resolv.conf, specifying 127.0.0.53 without on-the-fly search domains.
Some other custom file.
Chances are, you have a symbolic link to one of these files. In this scenario, systemd-resolved manages the 192.168.1.1 DNS setting provided in DHCP leases on your LAN, and your DNS client libraries communicate with systemd-resolved.

Interestingly, you might not see loopback interface traffic to/from 127.0.0.53 properly captured because systemd-resolved can optionally bypass the BIND DNS Client in C libraries, thus generating no such traffic to capture.

To handle DNS resolution, systemd-resolved uses an NSS module called nss-resolve, which is a plug-in for C libraries. This module replaces the traditional nss-dns plug-in, which uses the BIND DNS Client to perform DNS queries using the DNS protocol with servers listed in /etc/resolv.conf. nss-resolve communicates with systemd-resolved via a non-standard protocol over the Desktop Bus, ahead of nss-dns in /etc/nsswitch.conf.

To intercept this communication, you need to monitor the Desktop Bus traffic using tools like dbus-monitor, as it is not regular IP traffic and is reached via an AF_LOCAL socket.

If you wish to use a third-party DNS server like 1.1.1.1 instead of 192.168.1.1, you have three options:

Configure your DHCP server to distribute the desired DNS server IP (e.g., 1.1.1.1), and systemd-resolved will learn this from DHCP leases.

Configure systemd-resolved directly to use the desired DNS server instead of what it finds in DHCP leases.

Create your own /etc/resolv.conf file as a regular file (not a symbolic link), specify 1.1.1.1, and disable nss-resolve to revert to using nss-dns and the BIND DNS Client.

Configuring systemd-resolved for the second option involves various files and directories and is detailed in the resolved.conf(5) manual page.


Here are the commands featured on my video.

systemctl stop systemd-resolved
systemctl status systemd-resolved
nano /etc/resolv.conf_Rabi
rm /etc/resolv.conf
ln -s /etc/resolv.conf_Rabi /etc/resolv.conf
systemctl stop systemd-resolved
systemctl status systemd-resolved


Worthy mentions
cat /run/systemd/resolve/stub-resolv.conf
cd /etc


#linux #ubuntu #docker #vmware

Why does /etc/resolv.conf point at 127.0.0.53 in Linux?

Поделиться в:

Доступные форматы для скачивания:

Скачать видео mp4

  • Информация по загрузке:

Скачать аудио mp3

Похожие видео

array(10) { [0]=> object(stdClass)#4461 (5) { ["video_id"]=> int(9999999) ["related_video_id"]=> string(11) "XnepNult6UI" ["related_video_title"]=> string(86) "The /etc/hosts.conf, /etc/resolv.conf, and /etc/nsswtich.conf files on Linux Explained" ["posted_time"]=> string(21) "2 года назад" ["channelName"]=> string(23) "ComputerNetworkingNotes" } [1]=> object(stdClass)#4434 (5) { ["video_id"]=> int(9999999) ["related_video_id"]=> string(11) "up4zPl73UaA" ["related_video_title"]=> string(108) "Настройка сети в Linux // Демо-занятие курса «Administrator Linux»" ["posted_time"]=> string(21) "2 года назад" ["channelName"]=> string(45) "OTUS IT Онлайн - образование" } [2]=> object(stdClass)#4459 (5) { ["video_id"]=> int(9999999) ["related_video_id"]=> string(11) "DtFjrJdnWAU" ["related_video_title"]=> string(107) "How and why (not) to use the 127.0.0.53 nameserver, systemd-resolved and resolvctl Or what is syste…" ["posted_time"]=> string(19) "6 лет назад" ["channelName"]=> string(6) "FOSDEM" } [3]=> object(stdClass)#4466 (5) { ["video_id"]=> int(9999999) ["related_video_id"]=> string(11) "syzwLwE3Xq4" ["related_video_title"]=> string(43) "You want a real Name Server at home? // DNS" ["posted_time"]=> string(21) "2 года назад" ["channelName"]=> string(15) "Christian Lempa" } [4]=> object(stdClass)#4445 (5) { ["video_id"]=> int(9999999) ["related_video_id"]=> string(11) "XCKSJUJ9Z0A" ["related_video_title"]=> string(138) "Секретные «Хэллоуинские Документы» Microsoft Против Linux: Грязная Война 90-х" ["posted_time"]=> string(22) "10 дней назад" ["channelName"]=> string(5) "ZARGO" } [5]=> object(stdClass)#4463 (5) { ["video_id"]=> int(9999999) ["related_video_id"]=> string(11) "gd7BXuUQ91w" ["related_video_title"]=> string(50) "60 Linux Commands you NEED to know (in 10 minutes)" ["posted_time"]=> string(21) "2 года назад" ["channelName"]=> string(12) "NetworkChuck" } [6]=> object(stdClass)#4458 (5) { ["video_id"]=> int(9999999) ["related_video_id"]=> string(11) "WL2Xbndqy0k" ["related_video_title"]=> string(62) "Структура файлов и каталогов в Linux" ["posted_time"]=> string(21) "3 года назад" ["channelName"]=> string(16) "Aleksey Samoilov" } [7]=> object(stdClass)#4468 (5) { ["video_id"]=> int(9999999) ["related_video_id"]=> string(11) "VjZD3kkBzRE" ["related_video_title"]=> string(48) "How To Install And Configure DNS Server In Linux" ["posted_time"]=> string(21) "4 года назад" ["channelName"]=> string(29) "Tech Tutorials - David McKone" } [8]=> object(stdClass)#4444 (5) { ["video_id"]=> int(9999999) ["related_video_id"]=> string(11) "ad9VkhVncN8" ["related_video_title"]=> string(125) "DEBIAN - САМЫЙ СТАБИЛЬНЫЙ LINUX? Честный обзор Debian на десктопе: GNOME, KDE, Cinnamon." ["posted_time"]=> string(19) "1 год назад" ["channelName"]=> string(10) "LINUX PIMP" } [9]=> object(stdClass)#4462 (5) { ["video_id"]=> int(9999999) ["related_video_id"]=> string(11) "Nh5Jg-85VHg" ["related_video_title"]=> string(76) "Игорь Липсиц: Все будут неуклонно беднеть" ["posted_time"]=> string(21) "3 часа назад" ["channelName"]=> string(18) "The Breakfast Show" } }
The /etc/hosts.conf, /etc/resolv.conf, and /etc/nsswtich.conf files on Linux Explained

The /etc/hosts.conf, /etc/resolv.conf, and /etc/nsswtich.conf files on Linux Explained

Настройка сети в Linux // Демо-занятие курса «Administrator Linux»

Настройка сети в Linux // Демо-занятие курса «Administrator Linux»

How and why (not) to use the 127.0.0.53 nameserver, systemd-resolved and resolvctl Or what is syste…

How and why (not) to use the 127.0.0.53 nameserver, systemd-resolved and resolvctl Or what is syste…

You want a real Name Server at home? // DNS

You want a real Name Server at home? // DNS

Секретные «Хэллоуинские Документы» Microsoft Против Linux: Грязная Война 90-х

Секретные «Хэллоуинские Документы» Microsoft Против Linux: Грязная Война 90-х

60 Linux Commands you NEED to know (in 10 minutes)

60 Linux Commands you NEED to know (in 10 minutes)

Структура файлов и каталогов в Linux

Структура файлов и каталогов в Linux

How To Install And Configure DNS Server In Linux

How To Install And Configure DNS Server In Linux

DEBIAN - САМЫЙ СТАБИЛЬНЫЙ LINUX? Честный обзор Debian на десктопе: GNOME, KDE, Cinnamon.

DEBIAN - САМЫЙ СТАБИЛЬНЫЙ LINUX? Честный обзор Debian на десктопе: GNOME, KDE, Cinnamon.

Игорь Липсиц: Все будут неуклонно беднеть

Игорь Липсиц: Все будут неуклонно беднеть

© 2025 dtub. Все права защищены.



  • Контакты
  • О нас
  • Политика конфиденциальности



Контакты для правообладателей: [email protected]