Introduction to DNS and Firewall Configurations
You might occasionally encounter the error message “temporary failure in name resolution” on your terminal when attempting to ping a website, update a system, or carry out any action that needs a live internet connection.
For more Guides and Articles like this, make sure to visit our blog.
For instance, you can encounter the following error when attempting to ping a website:
ping google.com arzhost@ubuntu
Ping: Temporary name resolution failure for arzhost.com
This typically occurs when a domain name cannot be resolved into its corresponding IP address by your DNS server. Since you won’t be able to update, upgrade, or even install any software packages on your Linux machine, this could pose a serious difficulty.
We will examine some of the root reasons for the temporary failure in name resolution error in this post, along with potential fixes.
Resolving Issues with Incorrectly Configured or Missing resolve.conf File
At Linux systems, the resolver configuration file is located in /etc/resolve.conf. It includes the DNS records that your Linux system needs to convert domain names to IP addresses.
Create a file and add the Google public DNS server as specified if this file is absent or present but you are still experiencing name resolution issues.
name server 8.8.8.8
Save the changes and restart the systemd-resolved service as shown.
$ sudo systemctl restart is 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.
arzhost@ubuntu: ~$ ping google.com
Related article: Best Practices for DNS Performance and Security
Understanding Firewall Limitations and How to Overcome Them
If the first option does not work for you, firewall constraints may be keeping you from correctly doing DNS queries. Check your firewall to see if ports 43 (used for Whois search) and 53 (used for DNS – Domain Name Resolution) are open. Open the ports as follows if they are closed:
Managing Firewalls on Popular Linux Distributions
There are many Different types of Firewalls and They are Configured or Managed Differently on different Linux Distributions. some are given below:
I: Ubuntu, Debian, and Mint’s UFW Firewall: Overview of UFW
Run the following commands to configure the UFW firewall to open ports 53 and 43:
$ sudo ufw allow 53/tcp
$ sudo ufw allow 43/tcp
$ sudo ufw reload
II: Firewall Management for RHEL, CentOS, and Fedora: Key Features
Use the following commands on Redhat-based systems, such as CentOS:
$ sudo firewall-cmd --add-port=53/tcp --permanent
$ sudo firewall-cmd --add-port=43/tcp --permanent
$ sudo firewall-cmd --reload
We hope you now have a better understanding of the “Linux temporary failure in name resolution” error and how to quickly and effectively fix it. As always, I value your input.
FAQs (Frequently Asked Questions)
Q#1: How can I Resolve Name Resolution Issues?
8 Techniques for Resolving a DNS Error:
- Restart your device or software. Occasionally, merely closing the browser
- Completely stopping for a few minutes will fix the issue.
- Restart your router or modem.
- Change browsers.
- Stop the Firewall.
- Get Rid of Your Cache.
- Turn off further connections.
- Update everything frequently.
- Verify DNS settings
Q#2: Can the Resolution of a Digital Domain Name Fail?
Each server needs the IP address of a DNS server to which it can send DNS requests. As a result, if DNS servers’ IP addresses are not defined, your server will not be able to translate domain names into IP addresses, which will result in a temporary failure of name resolution.
Q#3: What is a Domain Name Resolution That Fails?
Cisco VPN isn’t functioning properly because of DNS problems, as seen by the VPN connection failing to owe to an unsuccessful domain name resolution error. By fiddling with your DNS settings, you can get around this solution. Additionally, this problem can be resolved by changing the contents of key files.
Read More:
- How Your Hosting Company Affects Your Website? Beyond the Basics
- How To Manage Multiple VPS Servers Efficiently?
- What is the Difference Between VPS and RDP
- How to Reset a VPS Server for a Fresh Start? Comprehensive Guide
- How to Set Up a VPN on Your VPS: Step-by-Step Guide