Temporary failure in name resolution kali linux

How to Resolve “Temporary failure in name resolution” Issue

Sometimes when you try to ping a website, update a system or perform any task that requires an active internet connection, you may get the error message ‘temporary failure in name resolution’ on your terminal.

For example, when you try to ping a website, you might bump into the error shown:

[email protected]:~$ ping google.com ping: tecmint.com: Temporary failure in name resolution

This is usually a name resolution error and shows that your DNS server cannot resolve the domain names into their respective IP addresses. This can present a grave challenge as you will not be able to update, upgrade, or even install any software packages on your Linux system.

In this article, we will look at some of the causes of the ‘temporary failure in name resolution‘ error and solutions to this issue.

1. Missing or Wrongly Configured resolv.conf File

The /etc/resolv.conf file is the resolver configuration file in Linux systems. It contains the DNS entries that help your Linux system to resolve domain names into IP addresses.

If this file is not present or is there but you are still having the name resolution error, create one and append the Google public DNS server as shown

Save the changes and restart the systemd-resolved service as shown.

$ sudo systemctl restart systemd-resolved.service

It’s also prudent to check the status of the resolver and ensure that it is active and running as expected:

$ sudo systemctl status systemd-resolved.service

Then try pinging any website and the issue should be sorted out.

2. Firewall Restrictions

If the first solution did not work for you, firewall restrictions could be preventing you from successfully performing DNS queries. Check your firewall and confirm if port 53 (used for DNS – Domain Name Resolution ) and port 43 (used for whois lookup) are open. If the ports are blocked, open them as follows:

For UFW firewall (Ubuntu / Debian and Mint)

To open ports 53 & 43 on the UFW firewall run the commands below:

$ sudo ufw allow 53/tcp $ sudo ufw allow 43/tcp $ sudo ufw reload
For firewalld (RHEL / CentOS / Fedora)

For Redhat based systems such as CentOS, invoke the commands below:

$ sudo firewall-cmd --add-port=53/tcp --permanent $ sudo firewall-cmd --add-port=43/tcp --permanent $ sudo firewall-cmd --reload

It’s our hope that you now have an idea about the ‘temporary failure in name resolution‘ error and how you can go about fixing it in a few simple steps. As always, your feedback is much appreciated.

Читайте также:  Best linux python ide

Источник

Как решить проблему «Временный сбой в разрешении имен»

Иногда, когда вы пытаетесь пропинговать веб-сайт, обновить систему или выполнить любую задачу, требующую активного подключения к Интернету, вы можете получить сообщение об ошибке «временная ошибка в разрешении имени» на вашем терминале.

Например, когда вы пытаетесь пропинговать веб-сайт, вы можете столкнуться с показанной ошибкой:

:~$ ping google.com ping: linux-console.net: Temporary failure in name resolution

Обычно это ошибка разрешения имен, которая показывает, что ваш DNS-сервер не может преобразовать доменные имена в соответствующие IP-адреса. Это может представлять собой серьезную проблему, поскольку вы не сможете обновлять, модернизировать или даже устанавливать какие-либо программные пакеты в своей системе Linux.

В этой статье мы рассмотрим некоторые причины ошибки «временный сбой в разрешении имен» и пути решения этой проблемы.

1. Отсутствует или неправильно настроен файл resolv.conf

Файл /etc/resolv.conf — это файл конфигурации преобразователя в системах Linux. Он содержит записи DNS, которые помогают вашей системе Linux преобразовывать доменные имена в IP-адреса.

Если этот файл отсутствует или есть, но ошибка разрешения имени по-прежнему возникает, создайте его и добавьте общедоступный DNS-сервер Google, как показано ниже.

Сохраните изменения и перезапустите службу systemd-resolved, как показано ниже.

$ sudo systemctl restart systemd-resolved.service

Также разумно проверить состояние распознавателя и убедиться, что он активен и работает должным образом:

$ sudo systemctl status systemd-resolved.service

Затем попробуйте пропинговать любой веб-сайт, и проблема должна быть решена.

2. Ограничения брандмауэра

Если первое решение вам не помогло, возможно, ограничения брандмауэра мешают успешно выполнять DNS-запросы. Проверьте брандмауэр и убедитесь, что порт 53 (используется для DNS — разрешение доменных имен) и порт 43 (используется для поиска whois). Если порты заблокированы, откройте их следующим образом:

Для брандмауэра UFW (Ubuntu/Debian и Mint)

Чтобы открыть порты 53 и 43 в брандмауэре UFW, выполните следующие команды:

$ sudo ufw allow 53/tcp $ sudo ufw allow 43/tcp $ sudo ufw reload
Для firewalld (RHEL/CentOS/Fedora)

Для систем на базе Redhat, таких как CentOS, вызовите следующие команды:

$ sudo firewall-cmd --add-port=53/tcp --permanent $ sudo firewall-cmd --add-port=43/tcp --permanent $ sudo firewall-cmd --reload

Мы надеемся, что теперь у вас есть представление об ошибке «временный сбой в разрешении имен» и о том, как ее исправить, выполнив несколько простых шагов. Как всегда, ваши отзывы очень ценятся.

Источник

How to Resolve the “Temporary Failure in Name Resolution” Error

Encountering the “Temporary failure in name resolution” error shows that Linux systems cannot translate a website name into IP address. While a lost internet connection may be a reason, there are several other factors that could cause this error. This tutorial is presented to help you troubleshoot and resolve this error.

Читайте также:  Arch linux file system

Prerequisites

To proceed with the solutions outlined below, ensure you have sudo or root privileges and a functional internet connection.

What is the Temporary Failure in Name Resolution Error

When we access a website, our system browser sends a request to a DNS server that will translate the domain name into an IP address. This IP address will connect the website’s server and load the content. If the DNS server fails to provide the IP address, the “Temporary failure in name resolution” error message appears.

For example, if we ping the website from a system, you may experience the following error:

Here the system failed to connect to the DNS server hence resulting in error.

The main three main reason why this error occur includes:

  1. Slow or No Internet Connection
  2. Badly Configured resolv.conf File
    • Misconfigured resolv.conf File Permissions
  3. Firewall Restrictions
    • Open the Ports in UFW Firewall

Solution 1: Slow or No Internet Connection

The first solution to resolve the error is straightforward as the user can check the internet connectivity on the system. If the internet is slow or not connected, you may experience this error.

Solution 2: Badly Configured resolv.conf File

The resolv.conf file sets up the DNS servers on Linux. Open the resolv configuration file in nano editor:

Make sure at least one nameserver is present inside the resolv.conf file. The nameserver looks like this:

Here in our case nameserver is:

If no nameserver is present in the system. Defined any of the nameservers. Some of the well-known name servers owned by Google are 8.8.8.8 and 8.8.4.4. By editing the resolv.conf file any of the nameserver can be defined.

Save the file and restart DNS service:

If the DNS server is restarted successfully no output will be returned.

You can also verify the DNS server by again pinging a website:

If communication is established with the website this means the DNS server is now working.

2.1. Misconfigured resolv.conf File Permissions

In some cases, despite the proper DNS server defined inside the resolv.conf file, the error persists. This may be due to file permission missing. Change the ownership access to root user by running the given command:

Run given command to give permission to each user to allow them to modify the resolv.conf file:

Now we will again ping the website.

If the error is due to wrong permission, the above commands will solve it.

Solution 3: Firewall Restrictions

Another reason for the “Temporary failure in name resolution” error is due to a firewall blocking access to the necessary ports, which includes port 43 used for whois lookup and port 53 used for domain name resolution.

3.1. Open the Ports in UFW Firewall

If the error is caused by blocking of port 43, run the below given command to allows traffic on this port:

Читайте также:  Linux server file manager

The Uncomplicated Firewall (UFW) confirms that rules have been successfully updated.

Similarly, we can also allow the permission for port 53 using:

Note: Sometime our UFW firewall is not enabled by default, so to enable it, use:

Now, reload the UFW firewall to apply the changes:

Conclusion

The error “Temporary failure in name resolution” can occur due to no internet connection, missing DNS nameserver or resolv.conf file permissions or firewall restriction. Main solution to this problem is to fix the internet problem, allow the resolv.conf file access to all users or unblock the UFW firewall protection at port 43 and port 53.

About the author

Kashif

I am an Electrical Engineer. I love to write about electronics. I am passionate about writing and sharing new ideas related to emerging technologies in the field of electronics.

Источник

🛠️ Как решить ошибку «Temporary failure in name resolution»

Иногда, когда вы пытаетесь проверить связь с веб-сайтом, обновить систему или выполнить какую-либо задачу, требующую активного подключения к Интернету, вы можете получить сообщение об ошибке “temporary failure in name resolution” на вашем терминале.

Например, когда вы пытаетесь проверить связь с веб-сайтом, вы можете столкнуться с указанной ошибкой:

ping itisgood.ru ping: itisgood.ru: Temporary failure in name resolution

Обычно это ошибка разрешения имен, которая показывает, что ваш DNS-сервер не может преобразовать доменные имена в соответствующие IP-адреса.

Это может стать серьезной проблемой, поскольку вы не сможете обновлять или даже устанавливать какие-либо программные пакеты в вашей системе Linux.

В этой статье мы рассмотрим некоторые из причин ошибки «temporary failure in name resolution» и решения этой проблемы.

1. Отсутствующий или неправильно настроенный файл resolv.conf

Файл /etc/resolv.conf – это файл конфигурации резолвера в системах Linux.

Он содержит записи DNS, которые помогают вашей системе Linux преобразовывать доменные имена в IP-адреса.

Если этот файл отсутствует или существует, но ошибка разрешения имени все еще возникает, создайте его и добавьте общедоступный DNS-сервер Google, как показано далее:

Сохраните изменения и перезапустите службу systemd-resolved, как показано.

$ sudo systemctl restart systemd-resolved.service

Также целесообразно проверить состояние резолвера и убедиться, что он активен и работает должным образом:

$ sudo systemctl status systemd-resolved.service

2. Ограничения межсетевого экрана

Если первое решение вам не помогло, значит ограничения брандмауэра могут помешать вам успешно выполнять DNS-запросы.

Проверьте свой брандмауэр и убедитесь, что порт 53 (используется для DNS ) и порт 43 (используется для поиска whois) открыты.

Если порты заблокированы, откройте их следующим образом:

Для брандмауэра UFW (Ubuntu / Debian и Mint)

Чтобы открыть порты 53 и 43 на брандмауэре UFW, выполните следующие команды:

$ sudo ufw allow 53/tcp $ sudo ufw allow 43/tcp $ sudo ufw reload

Для firewalld (RHEL / CentOS / Fedora)

$ sudo firewall-cmd --add-port=53/tcp --permanent $ sudo firewall-cmd --add-port=43/tcp --permanent $ sudo firewall-cmd --reload

Мы надеемся, что теперь у вас есть представление об ошибке “temporary failure in name resolution” и о том, как ее исправить, выполнив несколько простых шагов.

Источник

Оцените статью
Adblock
detector