Skip to content

kelvinintech/Configuring-and-Maintaining-DNS-Servers

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

77 Commits
 
 

Repository files navigation

Configuring-and-Maintaining-DNS-Servers

Hey Friends! @Kelvinintechhere 👋🏽👋🏽

I developed a project showing how to configure and maintain a DNS Server

A DNS server is a specialized computer server that stores a database of domain names and their corresponding IP addresses. When a device needs to translate a domain name (like www.example.com) into an IP address (like 192.0.2.1), it sends a request to a DNS server. The DNS server then looks up the domain name in its database and responds with the corresponding IP address.

Make sense?

this-is-so-strange-frederick-alexander-pye

Here's another explanation

Imagine a DNS server as a big directory or phonebook. Remember those? 🤣

It contains a list of domain names (like www.example.com) and their corresponding phone numbers (IP addresses). When you want to visit a website, your device asks the DNS server for the website's IP address. The DNS server looks up the IP address associated with the domain name and tells your device where to go.

At this point you're probably wondering, "so what is the DHCP thing?"

When your device joins a network, it might not know which DNS server to ask for IP addresses. DHCP helps by telling your device the IP address of the DNS server it should use. So, DHCP helps devices find and configure the DNS server they need to talk to when they want to resolve domain names.

i'm-so-confused-miranda-lucas

Confused again? It's okay! It means you are trying!

Here's an analogy of the DHCP and DNS relationship:

Imagine a family going on a road trip. The family consists of parents (DHCP) and their children (DNS).

DHCP (the parent) is responsible for managing the trip logistics. When they arrive at a new destination (network), DHCP assigns each child (device) a seat in the car (IP address) and provides them with a map (network settings), including instructions on where to stop for food (DNS server).

DNS (the child) knows how to read the map and understands where they need to go (which DNS server to use) to find the nearest ice cream parlor (IP address of a website). However, DNS relies on the directions provided by DHCP (the parent) to know which ice cream parlor (DNS server) it's allowed to visit on the trip.

In this analogy, DHCP acts as the parent figure, guiding DNS and providing necessary instructions (such as the IP address of the DNS server) to navigate the journey (network communication). DNS, like a child, follows these instructions to reach the destination (resolve domain names to IP addresses) effectively.

family-matters-ah-ha

When a DNS server is configured, depending on the need, additional DNS server and functionality can be configured for the hierarchy of the network these include the following:

Root DNS Servers: Root DNS servers' essential functionality is the translation of hostnames to IP addresses and provides answers to queries from devices on the network.

Internal & External DNS Servers: An internal DNS server will be hosted inside of the network and will only be accessible for internally connected devices. An external DNS server can be configured on the same network and handle only external requests. If an internal DNS server gets a request from an internal device and can not resolve it, the internal DNS server will contact the external DNS server to resolve the specific request.

Authoritative name servers: Authorative name servers contain specific information of the domain where it is located and are normally the last point of contact to resolve an IP address to a hostname.

DNS caching & Time to live configuration: DNS caching is a temporary database stored on a client machine. This database contains records of the recently visited sites and resources by the user. Time to live (TTL) is the time specified for how long a specific record should be stored on a server before it will be removed.

Recursive lookup: Recursive DNS queries are used when a DNS server queries other DNS servers on the network to determine the location of a specific IP address of a resource on the network.

The different record types can be configured on a DNS server to facilitate communication and access to resources located on the network. These records include the following:

Canonical name (CNAME): CNAME records are used in conjunction with A records in a DNS system and are configured to point to the domain and never to an IP address. It can be used to set up aliases for resources on the network.

Mail Exchange Record (MX record): MX records are configured on a DNS server to specify an SMTP server for the specific domain. These records are used to route outgoing emails to a mail server.

Start of Authority (SOA): These records are part of the DNS Zone file and specify the Authoritative Name Server for the DNS zone. The details for the domain administrator and how often the DNS information needs to be updated are also part of these records.

Pointer record (PTR): A PTR record provides the IP address associated with a domain name. It does the exact opposite of an A record.

Text record (TXT): A domain administrator will create TXT records to add notes to the DNS system for reference. In addition, these records can also contain data referencing other devices.

Service record (SRV): An SRV record is configured to point to a specific host and port on which the resource is available, for example, instant messaging or voice-over IP services.

Name Server record (NS): Name Server records are configured to indicate which DNS server is authoritative in the domain. It provides information on the domain’s IP address.

Below I documented the process of how to install and configure a DNS Server

Install and Configure an Alternative DNS Server

In the Server Manager window, select Add roles and features.

DCHP Server Lab

In the Add Roles and Features Wizard window, see Before You Begin in a larger font. At the bottom of the page, click Next.

Step 2

Leave the default selection and click bext on the Select installation type page

Step 3

In the Select destination server page, leave the default selection and click Next.

Destination Server

Enable the DNS Server checkbox.

Select Server Roles

In the Add Roles and Features Wizard pop-up window, click Add Features.

add features

In the Select features page, leave the default selection and click Next.

Select Features

On the DNS Server page, review the content and click Next.

Step DNS server

Click Install on the Confirm installationselections page.

Note:

The installation might take a couple of minutes to complete.

After the installation has been completed, click Close in the Installation progress window.

Step 5

Part 2 - Configuring an Additional DNS Server

In an internal network, it is best practice to configure an additional DNS server. This is to ensure high-availability and fault tolerance for the server.

In this task, an additional DNS Server will be configured for the internal network.

On the Server Manager window, click Tools and select DNS.

Step 6

On the DNS Manager window, expand Forward Lookup Zones.

Right-click PRACTICELABS.COM and select Properties.

forward lookup zones 2

In the PRACTICELABS.COM Properties dialog box, select the Zone Transfers tab

allow zone transfers

Enable the Allow zone transfers checkbox.

Leave the default settings and click OK.

allow zone transfers 1

Close the DNS Manager window

close dns manager window 1

We're Almost finished! Return to your original DNS Server

On the Server Manager window, click Toolsand select DNS.

original window - tools

On the DNSManager window, right-click DNS and select Connect to DNS Server

connect to server

On the Connect to DNS Server dialog box, select The following computer radio button.

Enter an IP address and click OK

CONNECT TO DNS SERVER RADIO BUTTON

note: The IP address specified for the existing DNS server is the Domain Controller on the internal network, which has already been set up as a DNS server. It might take a couple of minutes to resolve the IP address.

Click the IP address you entered in the DNS Manager window.

click the ip address you selected in the server window

Note: By selecting the added DNS server, the DNS records of the server can be viewed. It might take a couple of minutes to replicate the content. The replicated DNS records are read-only.

Right-click terminal name and select New-Zone...

new zone

In the New Zone Wizard pop-up window, click Next.

Right click on PLAB

In the New Zone Wizard > Zone Type page, select the Secondary zone radio button and click Next.

secondary zone

Note: By creating a Secondary DNs zone, the Primary DNS zone’s DNS records will be replicated to the secondary DNS zone. This will ensure high-availability for the DNS servers.

Leave the default selection in the Forward or Reverse Lookup Zone page, and click Next.

Leave the default selection in the Forward or Reverse Lookup Zone page, and click Next

Click Browse on the Zone Name page.

browse on the zone name

Select your IP address and click OK in the Browse window.

browse window

In the Browse window, select Forward Lookup Zones and click OK

Select forward lookup tables

Select 192.168.0.2 and click OK in the Browse window.

select 192 168 0 2

Select Practicelabs.com in the Browse window and click OK. (your PC will say something different than "practicelabs.com"

select practice labs

Back in the Zone Name page, click Next.

zone page click next

On the Master DNS Servers page, enter the following IP address in the Master Servers field and click Next.

masters DNS servers

Click Next in the New Zone Wizard > Completing the New Zone Wizard page. Then, click Finish.

complete zone wizard

Back on the DNS Manager window, expand your terminal dropdown > Forward Lookup Zones and select PRACTICELABS.COM.

Note: The Forward lookup zones have been successfully replicated to the new server. If the zones do not show, please refresh the page. This is a read-only copy of the primary server’s Forward lookup zone.

forward lookup zones practice labs

Close DNS Manager.

The Last Part!

Configuring a DNS Record A DNS A Record can be added to the DNS server. These records can then be used by client computers to locate specific resources on the network. DNS records are created using a specific resource's IP address, then translated to a hostname, making it easier to locate the specific resource.

In this task, different DNS records will be configured on a DNS reserver.

In Server Manager, select Tools and click DNS.

original dns server

On the DNS Manager window, expand Forward Lookup Zones > PRACTICELABS.COM.

On the DNS Manager window, expand Forward Lookup Zones

Right-click PRACTICELABS.COM (or your equivalent) and select New Host (A or AAAA)…

aa or aaaa

In the New Host dialog box, complete the following fields and click Add Host

NEW HOST

For example: This is how my screen appears

this is how mine looks

A prompt should display that says it was successfully created. 🥳

successfully created

A DNS A record is added to a DNS Server to specify a specific host on the network. In this example, the IP address of 192.168.0.3 will be translated to the hostname of storagesrv.practicelabs.com.

In a new window, right-click Start and select Windows Powershell (Admin).

windows powershell

In the Administrator: Windows Powershell window, type the following and press Enter: ipconfig /flushdns

Administrator Windows Powershell

In the Administrator: Windows Powershell window, type the following and press Enter: ipconfig /registerdns

register DNS

Executing these commands in Windows Powershell will update the DNS records for the client machine.

Note: After updating the client machine's DNS records, the newly created DNS records resolve successfully. Similarly, other DNS records can be created depending on the need in the network. These records can include MX, SRV, NS and several others

You've completed this lab successfully.

Take a moment to congratulate yourself 🥳🍻🍾🎉🙌🏽.

Feel free to utilize my documentation as a reference and share it with others if you found it useful.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published