DNS Configuration on Debian 11

 

Administrasi Sistem Jaringan ❘ DNS Configuration




A. Learning Objective

  • Know how to doing DNS Configuration 

  • Know how the local repository work

  • Learn how the client's Mac address is registered in order to get a static ip address.





B. Learning Material

   A Domain Name System (DNS) is a system that translates domain names into Internet Protocol (IP) addresses, enabling browsers to access requested online resources. In essence, the DNS is a system that stores all domain data on a network. Its functionality is analogous to that of a telephone directory, enabling users to search for a specific domain and retrieve its associated IP address. The DNS server translates requests to specific domains into IP addresses, controlling which server users have access to when they enter the domain name into their browser.


C. Learning Preparation

   It would be beneficial to have some preparation before learning about DHCP server configuration. Some tools and materials could be useful for that, such as:


1. PC/LAPTOP

2. Internet


3. Iso file Linux Debian 11 (Server)



4. Iso file Windows 10 (Desktop)

5. PuTTY

6. VMware (for virtual machine)


































D. Topology 






E. Configuration

1. First is a virtual machine should be created with Linux Debian 11 (server) as the operating system. Network adapter should then be used, with the first adapter configured in host only mode.



2. In order to gain access to the virtual machine, it is necessary to power it on and enter CLI mode. This may be achieved by utilising the username and password that were created either during the installation process of Debian 11 or within the BIOS settings. 



3. Use command ip a to see our IP address on the first interface, which is 172.18.0.44 Use this IP address to remote via PuTTY.



4. Please enter the IP address that we will be connecting to via PuTTY (SSH). Click Open to begin the remote session. To access PuTTY, ensure that you have completed the 'apt update' and 'apt install ssh' commands in the CLI on the VMware virtual machine.



5. If there is information appear like this just go ahead and accept it. 


6. We will continue with the practice initiated yesterday, namely the configuration of the DHCP server. The initial step in the configuration of the Domain Name System (DNS) is the installation of the software system responsible for the DNS, namely bind9.  Before we start the installation, just make sure we've got SSH and DHCP up and running. 


7. Use the cd /etc/bind command to enter the bind directory, and then use the ls or list command to view the contents of the directory. We can see the contents of the bind directory and we will edit the named.conf.local and named.conf.options, named.conf.local  is specifically used to define the DNS zones managed by your server. A DNS zone is a part of the DNS namespace that represents one or more domains. 


8. Then, use the nano named.conf.local command to add a forward zone to map domain names to IP addresses as well as map IP addresses to domain names, for example:

zone "domain.com" {

        type master;

        file "/etc/bind/namafile";

    };


zone "reverse.byte.in-addr.arpa" {

        type master;

        file "/etc/bind/ip";

    };


9. Next is, set up forwarders in named.conf.options against DNS. So that later this file can forward DNS Server requests to other servers that are forwarded. For example, here we use 172.18.0.1.


10. Move to the bind directory with 'cd /etc/bind', then copy the `db.local` and `db.127` files to thedesired forward and reverse zone names, for example `cp db.local asoy` and `cp db.127 44`, then verify with `ls`.



11. To edit the 'asoy' file type the command 'nano asoy'. Then, type in the desired IP Address and domainso that the DNS server can point to the correct IP Address, for example 172.18.0.44. Once done, save the changes by pressing `CTRL + X`, then `Y` for confirmation, and `Enter` to save the file.


12. Then edit the '44' file and configure the reverse DNS Server to map IP Addresses to domain names.When done, save the changes with `CTRL+X`, `Y`, and `Enter`. This allows the DNS Server to know the domain name based on the IP address.


13. Then edit the `/etc/resolv.conf` file with `nano /etc/resolv.conf`, and add the DNS IP and Domain Name information, such as search classoy.com, `nameserver 172.18.0.44`, and `nameserver 172.18.0.1`. Save with `CTRL + X`, `Y`, and `Enter`.


14. To restart the bind9 service, use the `systemctl restart bind9` command.

F. DNS Result

☆ Test Ping Domain


☆ Nslookup


☆ Dig


Summary


DNS configuration on Debian involves setting up a DNS server to resolve domain names to IP addresses,

enabling efficient communication between devices on a network. This includes installing and configuring DNS

software like BIND, creating zone files, and testing DNS resolution. Proper DNS configuration ensures reliable domain

name resolution and facilitates network operations.


Posting Komentar

0 Komentar