0% found this document useful (0 votes)
4 views13 pages

Linux DNS

The document provides a guide on setting up DNS and an Apache web server on CentOS or RedHat. It explains the function of DNS in translating domain names to IP addresses, details the installation and configuration steps for both the web server and DNS server, and outlines how to configure DNS settings on various operating systems. Key commands and configuration file locations are also included for reference.

Uploaded by

ceoviveksahu928
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views13 pages

Linux DNS

The document provides a guide on setting up DNS and an Apache web server on CentOS or RedHat. It explains the function of DNS in translating domain names to IP addresses, details the installation and configuration steps for both the web server and DNS server, and outlines how to configure DNS settings on various operating systems. Key commands and configuration file locations are also included for reference.

Uploaded by

ceoviveksahu928
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 13

DNS Setup

Apache webserver Setup

Topics DNS Setup


Custom Domain Name setup
What is DNS?
DNS, or Domain Name System, is the internet
service that translates human-friendly domain
names like www.example.com into machine-
readable IP addresses.
How DNS works?
www.google.com 192.168.0.1

www.example.com 192.168.0.2

www.hellloo.com 192.168.0.3

192.168.0.1
www.google.com
DNS Server

192.168.0.2

192.168.0.3
Let’s setup our own
WebServer
Installation (CentOS or RedHAT)
Package we need to install

• sudo yum install httpd


• systemctl start/stop/status httpd (httpd is the process or service name)

Enable the Service in Firewall


firewall-cmd --add-service=http --permanent
firewall-cmd --reload

Webserver config file under


• /var/www/html/index.html
/etc/httpd/conf/httpd.conf
Let’s setup our own
DNS Server
Installation (CentOS or RedHAT)
Package we need to install for the DNS is BIND (Berkeley Internet Name Domain)

• sudo yum install bind bind-utils


• systemctl start/stop/status named (named is the process or service name)

Enable the Service in Firewall


firewall-cmd --add-service=dns --permanent
firewall-cmd --reload

DNS config file under


• /etc/named.conf
Directory where all the zone files are present where you define hostname to IP etc
• /var/named
DNS Translate

Hostname to 192.168.1.2 (Called A Record)


192.168.1.2 to hostname (Called PTR Record)
Hostname to hostname (Called CNAME Record)
Zones Files

Forward zone - resolve Domain to IP


Reverse zone - resolve IP to Domain
Here’s how to configure your DNS settings on different operating systems:

Windows: Go to Control Panel > Network and Internet > Network and Sharing Center >
Change adapter settings. Right-click your network connection, select Properties, then
select Internet Protocol Version 4 (TCP/IPv4) or Version 6 (TCP/IPv6) and click
Properties. Here, you can set your preferred DNS server.

macOS: Go to System Preferences > Network, select your network interface, click
Advanced, and go to the DNS tab. You can add your DNS server here.

Linux: This depends on your distribution and network manager, but typically you can
edit /etc/resolv.conf directly or configure through network management tools (like
NetworkManager) to add your DNS server.

You might also like