{"id":2571,"date":"2025-03-24T11:06:36","date_gmt":"2025-03-24T11:06:36","guid":{"rendered":"https:\/\/www.hostitsmart.com\/manage\/knowledgebase\/?p=2571"},"modified":"2025-03-26T04:25:20","modified_gmt":"2025-03-26T04:25:20","slug":"how-to-configure-dns-in-linux","status":"publish","type":"post","link":"https:\/\/www.hostitsmart.com\/manage\/knowledgebase\/440\/how-to-configure-dns-in-linux.html","title":{"rendered":"How to Configure DNS on Linux?"},"content":{"rendered":"\n<p>Configuring DNS on Linux is crucial for network connectivity, security, and performance. Whether you are setting up a new server, troubleshooting network issues, or optimising your connection, it\u2019s important to know how to modify DNS settings.<\/p>\n\n\n\n<p>By default, Linux systems use DNS servers provided by the network or ISP. However, in many cases, you may need to change some settings to use a faster or more secure DNS provider like Google, Cloudflare, or OpenDNS.<\/p>\n\n\n\n<p>This guide will explore the different ways to configure DNS on Linux, ensuring smooth and efficient network communication.<\/p>\n\n\n\n<p><hr><p><strong>Also Read: <\/strong><a href=\"https:\/\/www.hostitsmart.com\/manage\/knowledgebase\/432\/create-new-group-in-linux.html\"><strong>How to Create a New Group in Linux?<\/strong><\/a><\/p><hr><\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Steps to Configure DNS on Linux<\/strong><\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">\u27a2 <strong>Configure DNS on Linux by Setting Up the Named Configuration Files.<\/strong><\/h3>\n\n\n\n<p>This method involves setting up a DNS server using BIND (Berkeley Internet Name Domain). BIND is one of the most widely used DNS software in Linux, allowing administrators to manage domain resolution effectively.<\/p>\n\n\n\n<p>Configuring named files lets you control how your DNS server handles requests and forwards queries.<\/p>\n\n\n\n<p><strong>Step 1: Install BIND<\/strong><\/p>\n\n\n\n<p>You have to run the following command to install BIND on your system:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong><strong>For Ubuntu\/Debian<\/strong><\/strong><\/li>\n<\/ul>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><tbody><tr><td class=\"kb_firewall\"><strong>sudo apt update &amp;&amp; sudo apt install bind9 -y<\/strong><\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>For CentOS\/RHEL<\/strong><\/li>\n<\/ul>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><tbody><tr><td class=\"kb_firewall\"><strong>sudo yum install bind bind-utils -y<\/strong><\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p>This command updates the package list and installs BIND, the primary DNS software for Linux.<\/p>\n\n\n\n<p><strong>Step 2: Configure Named Files<\/strong><\/p>\n\n\n\n<p>\u2794 You have to edit the main BIND configuration file:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>For Ubuntu\/Debian<\/strong><\/li>\n<\/ul>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><tbody><tr><td class=\"kb_firewall\"><strong>sudo nano \/etc\/bind\/named.conf.options<\/strong><\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>For CentOS\/RHEL<\/strong><\/li>\n<\/ul>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><tbody><tr><td class=\"kb_firewall\"><strong>sudo nano \/etc\/named.conf<\/strong><\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p>\u2794 After this, Add or modify the following section:<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><tbody><tr><td class=\"kb_firewall\">options {<br>\u00a0\u00a0\u00a0\u00a0directory &#8220;\/var\/cache\/bind&#8221;;<br>\u00a0\u00a0\u00a0\u00a0recursion yes;<br>\u00a0\u00a0\u00a0\u00a0allow-query { any; };<br>\u00a0\u00a0\u00a0\u00a0forwarders {<br>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a08.8.8.8;<br>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a08.8.4.4;<br>\u00a0\u00a0\u00a0\u00a0};<br>};<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p>This configuration allows DNS queries from any source to be forwarded to Google&#8217;s public DNS servers.<\/p>\n\n\n\n<p>\u2794 Once done, Just save and exit.<\/p>\n\n\n\n<p><strong>Step 3: Restart BIND Service<\/strong><\/p>\n\n\n\n<p><strong>\u2794<\/strong> <strong>For Ubuntu\/Debian<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><tbody><tr><td class=\"kb_firewall\"><strong>sudo systemctl restart bind9<\/strong><\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p>\u2794 <strong>For CentOS\/RHEL<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><tbody><tr><td class=\"kb_firewall\"><strong>sudo systemctl restart named<\/strong><\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p><hr><p><strong>Also Read: <\/strong><a href=\"https:\/\/www.hostitsmart.com\/manage\/knowledgebase\/431\/check-port-open-or-not-in-linux.html\"><strong>How to Check Whether Port is Open or Not in Linux?<\/strong><\/a><\/p><hr><\/p>\n\n\n\n<h3 class=\"wp-block-heading\">\u27a2 <strong>Configure DNS on Linux by Adding Forward and Reverse Lookup.<\/strong><\/h3>\n\n\n\n<p>DNS resolution works through forward and reverse lookups. A forward lookup resolves a domain name to an IP address, while a reverse lookup resolves an IP address to a domain name. Configuring both ensures proper DNS functionality and helps with troubleshooting network issues.<\/p>\n\n\n\n<p><strong>Step 1: Configure Forward Lookup Zone<\/strong><\/p>\n\n\n\n<p>\u2794 Firstly, you have to edit the zone file:<\/p>\n\n\n\n<p>\u2794 <strong>For Ubuntu\/Debian<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><tbody><tr><td class=\"kb_firewall\"><strong>sudo nano \/etc\/bind\/named.conf.local<\/strong><\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p><strong>\u2794<\/strong> <strong>CentOS\/RHEL<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><tbody><tr><td class=\"kb_firewall\"><strong>sudo nano \/etc\/named.conf.local<\/strong><\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p>\u2794 You have to add the following lines to define a forward lookup:<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><tbody><tr><td class=\"kb_firewall\"><strong>zone &#8220;example.com&#8221; IN {<\/strong><br><strong>\u00a0\u00a0\u00a0\u00a0type master;<\/strong><br><strong>\u00a0\u00a0\u00a0\u00a0file &#8220;\/etc\/bind\/db.example.com&#8221;;<\/strong><br><strong>};<\/strong><\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p><strong>*Note: You have to replace your domain with an example.com<\/strong><\/p>\n\n\n\n<p>\u2794 Once done, Just save and exit.<\/p>\n\n\n\n<p>\u2794 Now, you have to create the zone file:<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><tbody><tr><td class=\"kb_firewall\"><strong>sudo nano \/etc\/bind\/db.example.com<\/strong><\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p><strong>*Note: You have to replace your domain with an example.com<\/strong><\/p>\n\n\n\n<p>\u2794 Now, you have to add the following content. This file defines the authoritative name server and maps domain names to IP addresses.<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><tbody><tr><td class=\"kb_firewall\"><strong>$TTL 86400<\/strong><br><strong>@ \u00a0 IN\u00a0 SOA \u00a0 \u00a0 ns1.example.com. admin.example.com. (<\/strong><br><strong>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a020240321 ; Serial<\/strong><br><strong>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a03600 \u00a0 \u00a0 ; Refresh<\/strong><br><strong>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a01800 \u00a0 \u00a0 ; Retry<\/strong><br><strong>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0604800 \u00a0 ; Expire<\/strong><br><strong>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a086400 )\u00a0 ; Minimum TTL<\/strong><br><br><strong>@ \u00a0 IN\u00a0 NS\u00a0 \u00a0 \u00a0 ns1.example.com.<\/strong><br><strong>ns1 IN\u00a0 A \u00a0 \u00a0 \u00a0 192.168.1.1<\/strong><br><strong>www IN\u00a0 A \u00a0 \u00a0 \u00a0 192.168.1.2<\/strong><\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p><strong>*Note: You have to replace your domain with an example.com<\/strong><\/p>\n\n\n\n<p>\u2794 Once done, Just save and exit.<\/p>\n\n\n\n<p><strong>Step 2: Configure Reverse Lookup Zone<\/strong><\/p>\n\n\n\n<p>\u2794 Edit the zone file:<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><tbody><tr><td class=\"kb_firewall\"><strong>sudo nano \/etc\/bind\/named.conf.local<\/strong><\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p>\u2794 You have to add the following content to define a reverse lookup zone for the 192.168.1.x network.<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><tbody><tr><td class=\"kb_firewall\"><strong>zone &#8220;1.168.192.in-addr.arpa&#8221; IN {<\/strong><br><strong>\u00a0\u00a0\u00a0\u00a0type master;<\/strong><br><strong>\u00a0\u00a0\u00a0\u00a0file &#8220;\/etc\/bind\/db.192&#8221;;<\/strong><br><strong>};<\/strong><\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p>\u2794 Once done, Just save and exit.<\/p>\n\n\n\n<p>\u2794 Create the reverse lookup file:<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><tbody><tr><td class=\"kb_firewall\"><strong>sudo nano \/etc\/bind\/db.192<\/strong><\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p>\u2794 You have to add the following to map IP addresses back to domain names.<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><tbody><tr><td class=\"kb_firewall\"><strong>$TTL 86400<\/strong><br><strong>@ \u00a0 IN\u00a0 SOA \u00a0 \u00a0 ns1.example.com. admin.example.com. (<\/strong><br><strong>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a020240321 ; Serial<\/strong><br><strong>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a03600 \u00a0 \u00a0 ; Refresh<\/strong><br><strong>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a01800 \u00a0 \u00a0 ; Retry<\/strong><br><strong>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0604800 \u00a0 ; Expire<\/strong><br><strong>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a086400 )\u00a0 ; Minimum TTL<\/strong><br><br><strong>@ \u00a0 IN\u00a0 NS\u00a0 \u00a0 \u00a0 ns1.example.com.<\/strong><br><strong>1 \u00a0 IN\u00a0 PTR \u00a0 \u00a0 ns1.example.com.<\/strong><br><strong>2 \u00a0 IN\u00a0 PTR \u00a0 \u00a0 www.example.com.<\/strong><\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p><strong>*Note: You have to replace your domain with an example.com<\/strong><\/p>\n\n\n\n<p>\u2794 Once done, Just save and exit.<\/p>\n\n\n\n<p><strong>Step 3: Restart BIND to Apply the Changes<\/strong><\/p>\n\n\n\n<p>\u2794 <strong>For Ubuntu\/Debian<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><tbody><tr><td class=\"kb_firewall\"><strong>sudo systemctl restart bind9<\/strong><\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p>\u2794 <strong>For CentOS\/RHEL<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><tbody><tr><td class=\"kb_firewall\"><strong>sudo systemctl restart named<\/strong><\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p><hr><p><strong>Also Read: <\/strong><a href=\"https:\/\/www.hostitsmart.com\/manage\/knowledgebase\/430\/ls-command-in-linux.html\"><strong>Know About the ls Command in Linux With Examples<\/strong><\/a><\/p><hr><\/p>\n\n\n\n<h3 class=\"wp-block-heading\">\u27a2 <strong>Configure DNS on Linux by Restarting the BIND Server and Checking Status.<\/strong><\/h3>\n\n\n\n<p>Once you have configured DNS settings, it is essential to restart the BIND service to apply the changes. Additionally, checking the status ensures that BIND is running correctly and debugging any issues if required.<\/p>\n\n\n\n<p><strong>Step 1: Check BIND Status<\/strong><\/p>\n\n\n\n<p>\u2794 Run the following command to check the status, which helps confirm whether the service is running properly.<\/p>\n\n\n\n<p>\u2794 <strong>For Ubuntu\/Debian<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><tbody><tr><td class=\"kb_firewall\"><strong>sudo systemctl status bind9<\/strong><\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p>\u2794 <strong>For CentOS\/RHEL<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><tbody><tr><td class=\"kb_firewall\"><strong>sudo systemctl status named<\/strong><\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p><strong>Step 3: Test DNS Resolution<\/strong><\/p>\n\n\n\n<p>\u2794 You have to use dig to check if your DNS is working:<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><tbody><tr><td class=\"kb_firewall\"><strong>dig example.com<\/strong><\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p>Or use <strong>nslookup<\/strong>:<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><tbody><tr><td class=\"kb_firewall\"><strong>nslookup example.com<\/strong><\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p><hr><p><strong>Also Read: <\/strong><a href=\"https:\/\/www.hostitsmart.com\/manage\/knowledgebase\/429\/install-rpm-files-on-linux.html\"><strong>How to Install RPM files on Different Linux Distributions?<\/strong><\/a><\/p><hr><\/p>\n\n\n\n<h3 class=\"wp-block-heading\">\u27a2 <strong>Configure DNS on Linux by Binding with the UFW Firewall.<\/strong><\/h3>\n\n\n\n<p>The firewall must allow DNS queries for proper communication. UFW (Uncomplicated Firewall) is a simple and effective tool for managing firewall rules. Allowing DNS traffic ensures that your server can resolve and process domain requests.<\/p>\n\n\n\n<p><strong>Step 1: Allow DNS Traffic in UFW Firewall<\/strong><\/p>\n\n\n\n<p>Run the following commands to allow DNS through the firewall:<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><tbody><tr><td class=\"kb_firewall\"><strong>sudo ufw allow 53\/tcp<\/strong><br><strong>sudo ufw allow 53\/udp<\/strong><\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p>Port 53 is used for DNS queries; It allows both TCP and UDP to ensure proper functionality.<\/p>\n\n\n\n<p><strong>Step 2: Reload UFW Rules<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><tbody><tr><td class=\"kb_firewall\"><strong>sudo ufw reload<\/strong><\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p>Reloading applies the new firewall rules.<\/p>\n\n\n\n<p><strong>Step 3: Verify UFW Rules<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><tbody><tr><td class=\"kb_firewall\"><strong>sudo ufw status<\/strong><\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p>This command checks if DNS traffic is allowed through the firewall.<\/p>\n\n\n\n<p><hr><p><strong>Also Read: <\/strong><a href=\"https:\/\/www.hostitsmart.com\/manage\/knowledgebase\/428\/create-zip-file-in-linux.html\"><strong>Create Zip File With Command in Linux With Examples<\/strong><\/a><\/p><hr><\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Conclusion<\/strong><\/h2>\n\n\n\n<p>Mastering DNS configuration on Linux is like unlocking the map to seamless network communication! From setting up BIND to ensuring smooth lookups and securing traffic through the firewall, you have a solid foundation to manage DNS effectively.<\/p>\n\n\n\n<p>By following these steps, your Linux system will resolve domains like a pro, making your network faster, more secure, and well-optimized. Whether setting up a new server or troubleshooting DNS issues, you&#8217;re now equipped to handle it confidently.<\/p>\n\n\n    <div class=\"blg-advrt-main blg-prm-bx\">\n        <div class=\"row\" style=\"display: flex; justify-content: space-evenly; align-items: center;\">\n            <div class=\"col-md-5\">\n                <div class=\"blg-advrt-first blg-advrt-right\">\n                    <img decoding=\"async\" src=\"https:\/\/www.hostitsmart.com\/assets\/images\/blog\/Frequent-Server-Downtime.png\" alt=\"Frequent-Server-Downtime\" \/>\n                <\/div>\n            <\/div>\n            <div class=\"col-md-7\">\n                <div class=\"blg-advrt-first blg-advrt-left\">\n                    <div class=\"blg_advrt_cnt\">\n                        Haunted by an Unreliable Linux VPS?                    <\/div>\n                    <p>\n                        Get a power-packed VPS server for your Business!                    <\/p>\n                    <div class=\"blg-advrt-first-btn affl-blg-btn\">\n                        <a href=\"https:\/\/www.hostitsmart.com\/servers\/linux-vps-hosting\">\n                            Buy Linux VPS                        <\/a>\n                    <\/div>\n                <\/div>\n            <\/div>\n        <\/div>\n    <\/div>\n    \n","protected":false},"excerpt":{"rendered":"<p>Configuring DNS on Linux is crucial for network connectivity, security, and performance. Whether you are setting up a new server, troubleshooting network issues, or optimising your connection, it\u2019s important to know how to modify DNS settings. By default, Linux systems use DNS servers provided by the network or ISP. However, in many cases, you may [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[49],"tags":[],"class_list":["post-2571","post","type-post","status-publish","format-standard","hentry","category-vps"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v24.2 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>How to Configure DNS on Linux?<\/title>\n<meta name=\"description\" content=\"Learn how to configure DNS on Linux with this step-by-step guide. Set up, manage, and troubleshoot DNS settings for a smooth networking experience.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.hostitsmart.com\/manage\/knowledgebase\/440\/how-to-configure-dns-in-linux.html\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to Configure DNS on Linux?\" \/>\n<meta property=\"og:description\" content=\"Learn how to configure DNS on Linux with this step-by-step guide. Set up, manage, and troubleshoot DNS settings for a smooth networking experience.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.hostitsmart.com\/manage\/knowledgebase\/440\/how-to-configure-dns-in-linux.html\" \/>\n<meta property=\"og:site_name\" content=\"Host IT Smart Knowledge base\" \/>\n<meta property=\"article:published_time\" content=\"2025-03-24T11:06:36+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-03-26T04:25:20+00:00\" \/>\n<meta name=\"author\" content=\"Admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"5 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.hostitsmart.com\/manage\/knowledgebase\/440\/how-to-configure-dns-in-linux.html\",\"url\":\"https:\/\/www.hostitsmart.com\/manage\/knowledgebase\/440\/how-to-configure-dns-in-linux.html\",\"name\":\"How to Configure DNS on Linux?\",\"isPartOf\":{\"@id\":\"https:\/\/www.hostitsmart.com\/manage\/knowledgebase\/#website\"},\"datePublished\":\"2025-03-24T11:06:36+00:00\",\"dateModified\":\"2025-03-26T04:25:20+00:00\",\"author\":{\"@id\":\"https:\/\/www.hostitsmart.com\/manage\/knowledgebase\/#\/schema\/person\/317c14a877385667f19d3b7496bd5108\"},\"description\":\"Learn how to configure DNS on Linux with this step-by-step guide. Set up, manage, and troubleshoot DNS settings for a smooth networking experience.\",\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.hostitsmart.com\/manage\/knowledgebase\/440\/how-to-configure-dns-in-linux.html\"]}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.hostitsmart.com\/manage\/knowledgebase\/#website\",\"url\":\"https:\/\/www.hostitsmart.com\/manage\/knowledgebase\/\",\"name\":\"Host IT Smart Knowledge base\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.hostitsmart.com\/manage\/knowledgebase\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.hostitsmart.com\/manage\/knowledgebase\/#\/schema\/person\/317c14a877385667f19d3b7496bd5108\",\"name\":\"Admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.hostitsmart.com\/manage\/knowledgebase\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/d4827c56a6721070dde339640d47ff44ba0d0e515c7e577cf29305ab72383fe3?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/d4827c56a6721070dde339640d47ff44ba0d0e515c7e577cf29305ab72383fe3?s=96&d=mm&r=g\",\"caption\":\"Admin\"},\"sameAs\":[\"https:\/\/www.hostitsmart.com\/manage\/knowledgebase\/\"],\"url\":\"https:\/\/www.hostitsmart.com\/manage\/knowledgebase\/author\/admin\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to Configure DNS on Linux?","description":"Learn how to configure DNS on Linux with this step-by-step guide. Set up, manage, and troubleshoot DNS settings for a smooth networking experience.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.hostitsmart.com\/manage\/knowledgebase\/440\/how-to-configure-dns-in-linux.html","og_locale":"en_US","og_type":"article","og_title":"How to Configure DNS on Linux?","og_description":"Learn how to configure DNS on Linux with this step-by-step guide. Set up, manage, and troubleshoot DNS settings for a smooth networking experience.","og_url":"https:\/\/www.hostitsmart.com\/manage\/knowledgebase\/440\/how-to-configure-dns-in-linux.html","og_site_name":"Host IT Smart Knowledge base","article_published_time":"2025-03-24T11:06:36+00:00","article_modified_time":"2025-03-26T04:25:20+00:00","author":"Admin","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Admin","Est. reading time":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.hostitsmart.com\/manage\/knowledgebase\/440\/how-to-configure-dns-in-linux.html","url":"https:\/\/www.hostitsmart.com\/manage\/knowledgebase\/440\/how-to-configure-dns-in-linux.html","name":"How to Configure DNS on Linux?","isPartOf":{"@id":"https:\/\/www.hostitsmart.com\/manage\/knowledgebase\/#website"},"datePublished":"2025-03-24T11:06:36+00:00","dateModified":"2025-03-26T04:25:20+00:00","author":{"@id":"https:\/\/www.hostitsmart.com\/manage\/knowledgebase\/#\/schema\/person\/317c14a877385667f19d3b7496bd5108"},"description":"Learn how to configure DNS on Linux with this step-by-step guide. Set up, manage, and troubleshoot DNS settings for a smooth networking experience.","inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.hostitsmart.com\/manage\/knowledgebase\/440\/how-to-configure-dns-in-linux.html"]}]},{"@type":"WebSite","@id":"https:\/\/www.hostitsmart.com\/manage\/knowledgebase\/#website","url":"https:\/\/www.hostitsmart.com\/manage\/knowledgebase\/","name":"Host IT Smart Knowledge base","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.hostitsmart.com\/manage\/knowledgebase\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.hostitsmart.com\/manage\/knowledgebase\/#\/schema\/person\/317c14a877385667f19d3b7496bd5108","name":"Admin","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.hostitsmart.com\/manage\/knowledgebase\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/d4827c56a6721070dde339640d47ff44ba0d0e515c7e577cf29305ab72383fe3?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/d4827c56a6721070dde339640d47ff44ba0d0e515c7e577cf29305ab72383fe3?s=96&d=mm&r=g","caption":"Admin"},"sameAs":["https:\/\/www.hostitsmart.com\/manage\/knowledgebase\/"],"url":"https:\/\/www.hostitsmart.com\/manage\/knowledgebase\/author\/admin"}]}},"_links":{"self":[{"href":"https:\/\/www.hostitsmart.com\/manage\/knowledgebase\/wp-json\/wp\/v2\/posts\/2571","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.hostitsmart.com\/manage\/knowledgebase\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.hostitsmart.com\/manage\/knowledgebase\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.hostitsmart.com\/manage\/knowledgebase\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.hostitsmart.com\/manage\/knowledgebase\/wp-json\/wp\/v2\/comments?post=2571"}],"version-history":[{"count":4,"href":"https:\/\/www.hostitsmart.com\/manage\/knowledgebase\/wp-json\/wp\/v2\/posts\/2571\/revisions"}],"predecessor-version":[{"id":2628,"href":"https:\/\/www.hostitsmart.com\/manage\/knowledgebase\/wp-json\/wp\/v2\/posts\/2571\/revisions\/2628"}],"wp:attachment":[{"href":"https:\/\/www.hostitsmart.com\/manage\/knowledgebase\/wp-json\/wp\/v2\/media?parent=2571"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.hostitsmart.com\/manage\/knowledgebase\/wp-json\/wp\/v2\/categories?post=2571"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.hostitsmart.com\/manage\/knowledgebase\/wp-json\/wp\/v2\/tags?post=2571"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}