Linux DNS Server Configuration for Beginners

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hello everyone in today's video we are going to talk about Linux DNS configuration for beginners myself Mohammad zubair and this channel is all about showing you how to become a highly paid it pro really fast so without any further Ado let's get started [Music] so in terms of the Linux I'm going to use Ubuntu and first thing first we need to make sure that our system is updated and upgraded so the command for that is sudo space apt space update and just hit enter it will update your package list after that in case if there is any package that needs an upgrade we'll upgrade all of them so let's wait for it to get completed then we'll see what do we have so as you see there are 85 packages that can be upgraded so in order to upgrade all of them use the command as pseudo space apt space upgrade and after that hit enter while this will take a little bit of time because there are 85 packages that need an upgrade so I'll get back to you after I'm done upgrading all of them we are done and now it's time to install bind9 so for that purpose the command is sudo space apt space install space bind 9 and will also make sure to install all the utilities that comes with bind9 so I'll write here by 9 utils space 0.9 hyphen dock space hyphen y hyphen Y is a flag here after that hit enter and now it will install by 9 into audio Ubuntu and after that we'll be able to create a DNS server after installing byte9 there is one more thing that you need to install and that is sudo space apt space install space net hyphen tools hit enter I have already installed this one and now let me clear my terminal and now if I write here if config I'll show you what is my IP address my IP address is 192.168.231.134 we need this one and we'll use this one ahead in this video as well now what we need to do first first of all if I go into my CD slash Etc bind directory hit enter if I Alice here you see we have some of the files with the name of named dot conf dot local dot options and things like that so we'll configure some of these files in order to make ardu puntu as a DNS server so first of all Let Me Clear My terminal and I'll go back to my home directory and this time we need to open a file as sudo space Nano space slash Etc Bond slash named Dot bones dot options hit enter this is the file that we need in this file come to the line where it says forwards at the moment everything is in comments I'll remove it and if you see here there is an address with 0.0.0 we need to remove it I'll replace it with 8.8.8.8 this is an address of Google DNS after that you can use another one in case if you want to so this time I'll use 8.8.4.4 after that make sure to have your semicolon now we are good now press Ctrl X press y hit enter to save the changes we are done with the first change in the file and now we need to have another file this time I'll go for DB dot example.com hit enter at the moment there is nothing because we have just created this file now just paste the content that I'm going to paste in this file I'll paste this in the description of this video so you can follow that very easily at the end if you see here this is the IP address that we have onto our machine and if you remember my IP address was 192.168.2 2 3 1.134 so replace it with your IP address and if you see here here it says nsman.example.com and here you see we have ns1.example.com basically it's a domain name you can have your own domain name as per your liking and it can be anything after that press Ctrl X to get out of this press y to save the changes and hit enter and now we need to create a new zold so for that I'll use the same command but at the end of it I'll replace it with let's go for db.192 again we are creating a new file now we need to have some content or you can say some commands in this file again I'll put those commands in the description of this video so you can follow that here if you see again again we have our domain name which is example.com so make sure to go with one domain name that you keep in every file so if you remember in our previous file we had ns1.example.com and again we have the same one in here so after that press Ctrl X press y to save the changes and hit enter so as we have created a new zone now we have to make sure that we use the new Zone as well so we have to make sure that our bind 9 is connected with that so how can we do so so use the same command but at the end of it we'll change the file name this time I'll go for named dot conf dot local after that hit enter so here is the file that we need to configure so I'll just remove everything from here and I'll paste some commands in this one and again I'll paste those commands in the description of this video so I'll just paste everything in here so here if you see this is our domain name and it's a type of Master so basically this is the zone that we created and now our by 9 will use this particular Zone again we have to save changes so first of all press Ctrl X it will ask you to save the changes so press y it enters and we are good to go at the end we need to restart our bind 9 so for that use the command as sudo system CTL restart space is 0.9 and hit enter let's check the status of our buy 9 so for that instead of restart I'll write here status hit enter and here you see our 0.9 is up and running now let's just get out of this let me clear my terminal now I have my firewall into my Ubuntu so what I need I need to make sure that my bind 9 is allowed through my firewall so first of all what I need I need to make sure and I need to check if my firewall is up and running so I'll write here sudo space ufw space status hit enter at the moment it is inactive now to enable this one use the command as pseudo space ufw space enable and hit enter now let's check the status one more time and this time it says active it means our firewall is up and running now we need to have a rule that allows the bind 9 to go through our Firefall the command for that is sudo space ufw space allow and here just need to write by 9 and hit enter and you see rules have been added for ipv4 and V6 as well and now we need to reload our ufw so I'll write here sudo space ufw space the reload hit enter and it will say reload it here you see now at the end let's check the status one more time and we are done and here you can see we have bind9 available and enabled into our firewall and that also shows our firewall is up and running so we are done with everything that we need to do in order to have a DNS server configured into our Linux and now it's time to check if our DNS server is working or not so first of all I'll just get out of my Ubuntu and I'll go to my windows 10. so here is my Windows 10 and now what we need to do we need to open our Command Prompt so I'll go for the Run option and here I'll write CMD you can press Windows plus r key to open this run command click on OK or press enter and here we have our Command and from so this time what I'll do I'll use the command as ping space www dot example.com and if you remember example.com was our domain name now in case if we get any response from this command it means our DNS server is up and running hit enter yes we are getting the response from our server and that shows our ping command is working and that also confirms our DNS server has been configured successfully and it is working pretty fine as you can see four packets were sent four of them were received and it means that zero percent loss was there in case if it doesn't work in your system you have to do some more thing first of all go to your Wi-Fi icon at the bottom right corner right click on it and go to your open network and internet setting in case if you are using ethernet follow the same process go to your change adapter options from here right click on your Wi-Fi or your ethernet go to your properties and make sure to go for ipv4 or Internet Protocol version 4. open its properties and here you see we have option that says use the following DNS server address and enter the IP address of your Ubuntu or your Linux that you have used to configure your DNS server my IP address was 192.168.231.134 after that click on OK and now your command prompt will respond to your commands that you will enter basically I'm talking about the ping command so this is how it will work and that also brings me to the end of this particular video I hope now that you must have learned a few new things and if that is the case do leave a like subscribe and press the Bell icon I'll get back to you in the next video and if you have anything to ask do leave a comment below I'll get back to you as soon as possible till the next video take care
Info
Channel: SkillsBuild Training
Views: 15,538
Rating: undefined out of 5
Keywords: ubuntu, linux, DNS, configurednsserver, bind9, server, setup, configure, tools, serversetup, installation, database, domain, linuxdns, programmers, network, linuxtools, tech
Id: I8lawEbZKxA
Channel Id: undefined
Length: 9min 52sec (592 seconds)
Published: Tue Jun 06 2023
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.