The Differences between a DNS caching system, File Server, Database and Mail server
Published: 2022-07-03 15:25:21

## DNS CACHING SYSTEM
A DNS cache can be sometimes called a DNS resolver and 
it is serves as a temporary data storage of 
information about previous DNS call-ups on any system 
OS or web browser. It contains records of all the 
recent entries on a website as well as attempted 
entries too. Therefore, a DNS is essential a 
memory unit that contains history logs that a computer 
can quickly revert to before loading a website.


![dns](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/35gr3skdfb3ssyeoguvb.png)

The DNS cache reduces the wait time a traditional DNS system would take to load the contents of a web server. Therefore, it is an important part of a web setup and we will be adopting a DNS caching tool called Bind (Berkeley Internet Name Domain) version 9. This section will focus on installing, configuring, and integrating the DNS cache server on our local machines.

To Install BIND:

    # yum install bind bind-utils
 
Enable and start the named service:

    # systemctl enable --now named


To verify the status of the named service:

    # systemctl status named

DNS poisoning is another area of concern when configuring a DNS cache because hackers could corrupt a DNS resource record. A DNS system is susceptible to phishing attacks when attackers snatch a web session and redirect a request to an unintended server. These alternate web pages might expose users to annoying advertisements that are aimed bat tricking them to download malware that can be used to steal their sensitive information from their local engine. Therefore, it is advisable to flush the DNS cache regularly to reduce the threat to a cyber-attack. There are several reasons why resetting the DNS record to zero is useful and they will be listed below.

- This practise can offer protection from external manipulation.
- It can also solve some technical issues that debugging won’t solve.
- It can offer extra security by concealing the search patterns of a user.

## FILE SERVER

A file server is a computer that oversees the storage and control of data. In a company setting, a file server contains files that can be accessible to users connected to the same local-area network (LAN). As a security measure, the use of gateways and protocol conversion can provide extra security, it acts as a central hub in a computer network. This process needs both hardware and software resources for integration within a system. Although, once the necessary authorizations have been set, permitted users can open, read, delete, or change file folder on the server or even upload new files. The most common types of file servers are:

- Google Dropbox
- MS Azure
- Google Drive
- MS OneDrive

## DATABASE SERVER

It is important to fully grasp the ideology of what a database is, how it communicates with a computer system and its primary functionalities before choosing a database model to use. A database is an application that can save a well-documented and arranged collection of records which can be called upon or accessed whenever. It could be records of names in a company or record of patient’s data in the hospital. These records can be arranged in columns and rows which would help pinpoint information easily. Today, there are many powerful database models readily available for use and the only difference between these models is that they have integrated distinct api’s that execute operations like create, manage, access and search in the data stores. Examples of such databases are Sybase, MongoDB, MySQL, PostgreSQL etc. But from the specifications of this project, we will be using the MySQL database model in the new NBM system.

**MySQL**: This database is an open-source relational database management system (RDBMS) with a client server model attached to it. MySQL allows its users to modify the source code at any interval to better suit their needs. It is perfect for storing huge data sets either for e-commerce websites or for data analytics purposes. MySQL is compatible with many operating systems and programming languages like PHP, PERL, C++, Java etc. Also, in terms of security, MySQL is ideal because certain levels of encryption can be set with it.


## MAIL SERVER

A mail server can be seen as a digital mail man. 
Emails that we receive daily pass through many mail servers before reaching its recipient. Whilst it feels like messages are sent and received in an instant, moving from one sender to receiver in a split-second. The truth is that under that short amount of time, complex processes have taken place in the background and without these processes in the different mail servers, one would be confined to sending emails to only people that have matching email domain name.


### TYPES OF MAIL SERVERS

Mail servers can be divided into two main categories which are – outgoing mail servers and incoming mail servers. Outgoing mail server are known as SMTP (i.e., simple mail transfer protocol) servers, while incoming mail servers are identified with 2 variants which are the POP3 (i.e., post office protocol) and IMAP (i.e., internet access protocol). The main difference with these two server types is in where they store their messages, POP3 stores data on pc or mobile devices local drives while the IMAP stores data on the server itself.

#### POSTFIX

For the mail server system that would be implemented in NBM, the latest version of postfix will be integrated because postfix is open-source and supports SMTP among other functionalities. But for this project postfix will be used for only SMTP.
Note: In Red Hat Enterprise Linux, before commencing the postfix download, it is advisable to enter the following command below to verify if the postfix package is already installed because they are usually pre-installed:

Run:

    ~j$ rpm -q postfix

To check if the postfix package is installed. If it is not installed, use the yum utility root to install it:

    ~]# yum install postfix


After installing postfix, you can now start the service and enable it to give it full access to run.


    $ systemctl start postfix
    $ systemctl enable postfix


#### DOVECOT

Dovecot is also an open-sourced mail server that will be used for additional security in NBM. It has support for the POP3 functionality and this tool mostly comes pre-installed in most LINUX distros, but if it is not installed then there are simple steps outlined below to guide the installation process using the yum function.

Run:
    $ yum install -y dovecot

Once the installation is done, enabling the service is next and this will be done with the systemctl function:

    $ systemctl enable dovecot
    $ systemctl start dovecot