Sunteți pe pagina 1din 14

Amirul Daniel Bin Che Suzami ( 25DIS17F2006 )

DFN6033

OPEN SOURCE SERVER


ADMINISTRATION
ASSESSMENT : PRACTICAL TASK

NAME Amirul Daniel Bin Che Suzami

REGISTRATION NO 25DIS17F2006

CLASS / SESSION DDT5 IS1

PRACTICAL TASK 1

LECTURER Pn. Syearifah Binti Shahidan


DFN6033: OPEN SOURCE SERVER ADMINISTRATION
TOPIC: 2.2 SET UP DOMAIN NAME SERVICE (DNS) IN LINUX SERVER

INTRODUCTION

This is our first practical task, we are required to set up an infrastructure for a proper Domain
Name System (DNS), I’ve made four servers but we are only required to do two, which is ns1
and host1(amirul1).

Task 1
Using Ubuntu Server Version 18.04 LTS for Primary Server and Generic Host1.
Host Role Private Fully Private Ip
Qualified Domain
Name

ns1 Primary Server ns1.ossa.ddt.com 172.31.37.45

ns2 Secondary Server ns2.ossa.ddt.com 172.31.38.11

host1 Generic Host 1 amirul1.ossa.ddt.com 172.31.41.169

host2 Generic Host 2 amirul2.ossa.ddt.com 172.31.85.13


Figure 1

1.1. I’ve made four servers but in this task we are required to use two, I'll be using all four of the
servers IP’s as well even though we are required to do two. If someone wants to do only two
servers, they will just not input any IP for ns2 or host2.

Figure 2
Task 2
Install Berkeley Internet Name Domain(BIND) on Domain Name Server(DNS).

2.1. Before anything we have to run “sudo apt-get update && sudo apt-get upgrade” to make
sure our server is up to date.

Figure 3

2.2. After that we will install BIND by using “sudo apt-get install bind9 bind9utils bind9-doc”.

Figure 4
2.3. After that we will configure BIND to IPv4 mode by running “sudo vim /etc/default/bind9”
and adding -4 at the end of the parameter.

Figure 5

2.4. Run “sudo systemctl1 restart bind9” to restart BIND.

Figure 6
Task 3
Configure the Primary Domain Name Server(DNS).

3.1 Configure the Options File.


i. We will add our IP Address under the acl “trusted” block which we have to make.

Figure 7

ii. Now under the options block which is there by default we will add some new lines.

Figure 8
3.2 Configure the Local File.
i. Add both zone blocks for type master. If you have a secondary server, allow-transfer and set
the Secondary Server IP Address there.

Figure 9

3.3 Creating the Forward Zone File.


i. First we have to create the directory by using “mkdir” then we will copy and rename
“db.local”.

Figure 10
ii. Then by using “vim” we shall edit the newly renamed file in the directory.
-Edit SOA record.
-Edit Serial number.
-Delete three lines that exists right under the first semi-colon.
-Add name servers block.
-Add “your IP Address” block.

Figure 11

3.4 Creating the Reverse zone File.


i. Copy the file named “db.127” and move it into zones directory and rename it too your own two
first octet server IP Address.

Figure 12
ii. Then by using “vim” we shall edit the newly renamed file in the directory.
-Edit SOA record.
-Edit Serial number.
-Delete two lines that exist right under the first semi-colon.
-Add name server block.
-Add PTR records block. (Note - Under PTR is the reverse octet of server IP Address)

Figure 13

3.5 Checking for errors in DNS Configuration.


i. We will use “named-checkconf” to check both Forward and Reverse Zone File then restart to
apply the configuration.

Figure 14
Task 4
Configure Domain Name Server (DNS) Client.

4.1 Configure The Options File.


i. To configure the option file we first have to know what adapter we are using. Run “ip address
show to 172.31.0.0/16”. (Note - IP Address may differ)

Figure 15

ii. Now we will use “sudo vim /etc/netplan/00-private-nameservers.yaml” for configuration.

Figure 16
4.2 Check that the system’s DNS resolve to determine if your DNS configuration has been
applied.
i. We are using Ubuntu 18.04 LTS servers so we can use “sudo netplan try” to run configuration
automatically.

Figure 17

ii. Now we will check our DNS configuration by using “sudo systemd-resolve --status”.

Figure 18
Task 5
Testing Clients.

5.1 Ping between ns1 and host1.


i. This is the DNS Server pinging to DNS Client.

Figure 19

ii. This is the DNS Client pinging to DNS Server.

Figure 20
5.2 Using Dig.
i. This is ns1.

Figure 21

ii. This is host1 (amirul1).

Figure 22
5.3 Check the Forward Lookup.

Figure 23

5.4 Check the Reverse Lookup.

Figure 24
CONCLUSION

In conclusion this task is all about setting up a proper Domain Name Server (DNS) by
using Berkeley Internet Name Domain (BIND). This practical task is filled with challenges as I
was only given some reference and a little guidance from my lecturer, but despite that I manage
to finnish it under the due date thanks to the help of my lecturer and some fellow classmates.

In a nutshell, this task taught me how to configure BIND, DNS Server and the DNS
Client. It helped me distinguish the difference between Forward Zone and Reverse Zone. Finally,
In this task it wasn’t all that smooth I had some errors and rough bumps, but the most notable
error I had was that I couldn’t “nslookup” my host as it turns out I couldn’t ping to other servers.
Turns out, I haven’t configure my instance “inbound” settings as I am using AWS Educate for a
Ubuntu Cloud Server.

“Sometimes the questions are complicated and the answers are simple.”
-Dr.Seuss

REFERENCE

DigitalOcean. (2019, September 18). How To Configure BIND as a Private Network DNS
Server on Ubuntu 18.04. Retrieved from
https://www.digitalocean.com/community/tutorials/how-to-configure-bind-as-a-private-network-
d​.

ns-server-on-ubuntu-18-04.
Ubuntu Documentation. (n.d.). Retrieved from
https://help.ubuntu.com/lts/serverguide/dns.html​.

Cannot ping AWS EC2 instance. (1964, March 1). Retrieved from
https://stackoverflow.com/questions/21981796/cannot-ping-aws-ec2-instance​.

S-ar putea să vă placă și