How to Install and Configure DNS Server in Ubuntu (Linux)
HTML-код
- Опубликовано: 27 окт 2024
- How to Install and Configure DNS Server in Ubuntu (Linux)
-------------------------------------------------------------------------
#dnsserver #ubuntudnsserver #ubuntudns #dnsserverlinux
Install and Configure DNS Server in Ubuntu
Install and Configure DNS Server in Linux
Installing and Configuring DNS Server in Ubuntu
Install and Configure DNS Server in Ubuntu Step-by-step.
Step-by-step Installation and Configuration of DNS Server in Ubuntu
Install and Configure DNS Server
How to Install and Configure DNS Server
Install DNS Server in Ubuntu
Install DNS Server in Ubuntu Step-by-step
Installing DNS Server in Ubuntu
DNS Server in Ubuntu
DNS server
DNS server configuration
DNS server ubuntu
DNS server setup
DNS server setup ubuntu
DNS server configuration in Linux
DNS server Linux - Наука
This video helped me get a job. Thank you from the bottom of my heart, and please keep doing what you are doing.
That's a great compliment! Thank you very much and I'm so happy for you!!
❤❤
after doing lots of rnd to setup the dns , i was not succeded but , this video helped me to work. now my work is done , thank you so much
you have my eternal respect !! i dont know you but i consider you a friend from across the world
Thanks from the core bro... works 100%.👌👌😎😎😍😍💯💯🔥🔥🙏🙏👍👍
Excellent work. Thanks a lot !
You got me up and running, with all the ways to configure this DNS this is straightforward. The only thing extra I had to do was change permissions on sudo chmod 777 /run/systemd/resolve/resolv.conf to be able to save the edit. and she worksssssssss!!!!!!!!!!!
Thank you, professor!
thank you!! perfect working!!!
Great video about DNS. Clear understanding...Thank you for this type of video
Glad it was helpful!
Thank you sir a lot everything is working nice 👌
Need help, i want to host website from home pc, after dns create, apache server can connecting to domain, ??? Or i have to do something else..?? Reply me in detail!!
Hi, I recently made a video showing how to host websites at home PC. If you have not fond a solution yet, please check it out ruclips.net/video/8PdYo95LIhk/видео.html
hey sir at minute 23:00 when we do bind9 status it said "managed-keys-zone: unable to fetch dnskey set '.' :timed out " and also said that brokent trust chain resolving etc
so when we did the ns lookup it didn't work also and said servfail
If you are using one server, you should check for configuration errors.
Hey i tried the nslookup + my domain and it send back server cant find domain name:SERVFAIL. How do i go about it?
thank you so much Sir , you save my life
how do i know which ip address to use? or can it be any one of them? 0:28
You can use any statically configured IP, not a DHCP assigned IP.
@@HudaTechTalk in my ubuntu, there is only ens33 interface and the ipv4 has a limited lifetime
what do i do?
@@farhanishraq5812Only one interface is fine. You just have to configure it with static IP before you can use it in the DNS records.
Hi Dear Nurul Huda. Thank you for your helpful video. I followed your guides and could successfully create and configure and test forward lookup zone but encountered with SERVFAIL in testing reverse lookup zone. I didn't see you test it in video. What should I do?
Hi Salehi, if you use nslookup command with IP as a parameter the DNS server should return a number of records like "15.0.16.172.in-addr.arpa name = www.nurul.local.". Also, you can use host command with IP as a parameter and the DNS server will return a number of records like "15.0.16.172.in-addr.arpa domain name pointer www.nurul.local.". If you are getting serverfail, there could be errors in reverse lookup zone records (as simple as space issues). I didn't find any issue in my reverse lookup zone tests.
20:38 I just wanna make sure I understand what you do here:
you entered 15 cause your clients will get their IPs of your dhcp server starting from x.x.x.15, therefor you put 15 into it. or is 15 your ip address of your server?
@@papierbndc ....15 is the IP address of the server.
@@HudaTechTalk got it, thx
Greetings sir, could you kindly help me to check what went wrong about my configuration? I followed all the configurations, just only changed the IP addresses of your device and router's gateway to mine. No errors were shown in named-checkconf and name-checkzone (for both forwarding and reversing files), but I do not understand why, when I do nslookup, it shows to "**server can't find www.(my hostname --fqdn): NXDOMAIN" instead of name and address under "non-authoritative answer:", after the server and address.
To identify the issue, I think you need to do troubleshooting using the process of elimination.
Hi have u solve this issue?
@@cl9599 Yes, I finally found out that after removing my hostname from my hostname --fqdn, which is just equivalent to my dnsdomainname (registered in the /etc/bind), I can do nslookup successfully.
Sir can you tell in 20:42, why did you write 15?
Hi, The format needs only the host ID in the network. The number 15 represents the host ID of the host IP (It essentially represents 172.16.0.15)
its the last oktet of his server: for example my web server is running on x.x.x.15, than I would type in 15. if its on x.x.x.12 I would put 12. got it? /24 means that the first 3 oktets are still the same so we only need to specify the last oktet. in his case, his server has the ip 172.16.0.15/24
Hi there, I'm getting a "** server can't find *domain*: NXDOMAIN
" error, I've re-watched and checked my setup and it's the same but I'm still having this problem. Do you know anything that may help?
Did you add the configured DNS server IP to your test machine DNS setting?
Hi bro dns conf setup working fine but when ping the domain in client side not get how to setting the dns server ip in client machine (already add in dns field but not getting)
On 7:27 why using 172.16.0.2 ?
That is the default gateway address. You should use the default gateway address of your network.
hey thanks for this video. It is by far one of the best. i have a question aboit restarting the BIND9 after the configuration. i get this error : Job for named.service failed because the control process exited with error code. could you give possible reasons for this error?
I added my internal router/switch IP and it works although I wonder if I should add the external router IP
Hello :)
In just wondering, is this local only or is the DNS also accessable outside the network?
For instance if I'm at work and want to connect to the DNS server from there :)
In short, yes it is local only. Since, it is configured on a private network (private IP), it is not routable on the Internet. i.e., the DNS configured at home will not be available from work, unless you connect to the home network using some technology such as VPN.
@@HudaTechTalk Ahhh thank you for the explanation :)
But if we use a VPN, do we need to also portforward it? :)
@@Mosestylez VPN will need VPN server and won't need port forwarding. There is a video for VPN configuration.
@@HudaTechTalk Hmm but would Nordvpn work? That VPN does not have any portforwarding🤔🤔
@@Mosestylez Yes it will work.
Why I do not have the ens38 static ip line and I only have the dhcp address.I use that address to configure but it do not work. cry
A server should always have a static IP, never a DHCP assigned IP (as it can change). Before you configure the server for DNS, make sure it is configured with a static IP in the network.
Thank you for te tutorial. I have got a problem, whenever i restart the machine the file at /etc/resolv.conf becomes empty. I have done the symlink step properly. Please help!
Thank u so much Sir for the tutorial.
But please i have a little issue, well i followed the video step by step everything happens to be fine until the 25min part i get the following message,
sudo: unable to resolve host a-virtualBox:Name or service not known and I'm sure that i typed exactly the same command as in the video. Please help
I am guessing your issue without any troubleshooting. Please check (1) /etc/hostname file contains only your machine name (e.g., nh-ubuntu20). (2) /etc/hosts file contains 3 lines like these "127.0.01 localhost", "127.0.1.1 nh-ubuntu20.nurul.local nh-ubuntu20" and ""172.16.0.5 nh-ubuntu20.nurul.local nh-ubuntu20". Please make sure you use your own machine name, your own domain name and your own IP.
Bro i have this error called "managed-keys-zone unable to fetch dnskey set '.' failure" how can i fix this??
I have a question that comes to mind
We assume that we have 5 records, all of them with the same domain name, and each record has a different IP
Why when requesting query
The Name Serverin Response brings me all five records, not one or two
Is this constant in dns?
Or there something that can control this? I mean two records only go not the five
Which records will be returned depend on the host part of the FQDN. If the host part links to 5 different IP's, it will return all five. If the host part links to 2 different IPs, then it will return 2. (Sorry, was not clear about your question).
good video
nice video but i have got a error, can u help me?
when using "view" statements, all zones must be in views
I am assuming you defined your zone in "/etc/bind/named.conf.local". Create the view in named.conf file and inside the view make sure to include your zone file and default zone file like this...........view "viewname" {
include "/etc/bind/named.conf.default-zones";
include "/etc/bind/named.conf.local";
};
That will include all zones from both files in the view. If you explicitly use any zone in the view and that is also in one of the files, then don't include that file; instead, put all remaining zones of that file in a different view.
Awesome Sir. Please share your files. Thanks
Thank you, it's very usefull.
Thank you, good men
Port forward is important for this ??
Not really.
@@HudaTechTalk brother one more question, i want to host website from home pc, after dns create, apache server can connecting to domain, ??? Or i have to do something else..?? Reply me in detail!!
@@salexkorsan8790 You need to register your domain. Make a DNS entry in the domain registrar for your home router's Public IP, configure port forwarding on your home router (your home public IP & port 80 to your internal Webserver & port 80). You will not need a DNS server. Hosting at home computer is not a feasible option as an Internet connection's upload speed (which is the same as download speed for your users) is not high. Also, be aware that your home router's public IP can change as it comes from a DHCP server of the ISP. Therefore, if your home router's public IP does change, the DNS entry at the domain registrar becomes invalid (and thus need to be changed too). ISP may not allow to host website at home too.
@@salexkorsan8790 Here is a video that shows how to host a web server at a home computer. ruclips.net/video/lvpbmuvL-Go/видео.html
@@HudaTechTalk Thank you Very Much Deeply from Heart Brother
Каким образом на рег ру можно прописать NS1 NS2 домены третьего уровня? сейчас в настройках это не получается сделать. Пишет Неверное имя хоста DNS-сервера ().
Sir, i am getting the hostname but not domain name.
Please help
It says unable to resolve host "name": name or service not known.
I have Google dns on /etc/resolv.conf
(Google DNS will resolve name to IP for any registered domain, but not for an unregistered domain (like the example I used). If you are configuring your own DNS server, you will need to use your own dns in /etc/resolv.conf file). A small error can make it not work. After configuring all the files as shown, You can restart the machine and use the commands shown from time 22:10 to 23:10 to check if there is any error. Those commands might not show the exact error (if any), but will indicate whether there is any error. If there is any error, you need to find and fix the error by checking all of the related files carefully.
Thank you sir for your response, my dns server is up and running. Thanks for the detailed explanation on video.
Just a follow up sir, how do I add PTR and how do I check the dns logs.
@@avinashshekar3692 PTR records are added in reverse lookup zone file. See examples at time 21:15. To see DNS log, you need to configure logging first.
Thank you sir for your response
hello, quick question why did you set ns1 in the db file if your
hostname is nh-ubuntu20. It does not make sense for me
The hostname will be different for different organizations. As DNS server is for public use, we should use a common name that is well known to public and ns1 or ns2.. these are the commonly used names for DNS server (like www is the commonly used alias name for web server).
Hi Nurul, nice video... I have some questions
I have a paid domain, that I need to use with your tutorial. The IP address that I need to use is the internal IP address on which is the server ? or do I need to use the internet IP address?
what else needs to be changed when trying to use the paid domain?
Thx in advance.
Regards.
The best solution for hosting a website (in your registered domain name) is to use hosting provider's hosting service. A DNS server in a private network/private IP is unknown to the Internet. To your domain registrar site, you need to configure/specify the name server to be a publicly available DNS server to make your domain name accessible on the Internet. There are a lot of risks and limitations for hosting a webserver at home/in private network. To access a website using your home network's public IP, you may try port forwarding feature (if available) of home router.
Hi, Here is a video that shows how to host website at home computer using registered domain. ruclips.net/video/8PdYo95LIhk/видео.html
@@HudaTechTalk Thx for your reply, pfw is not an issue to my set-up, the only drawback is the know-how from mi side.
thx.
After checking bind status -showing error like unable to fetch dnskey set, how to solve the error?
I got the same error have you solved it ?
i Have 3 Server's in three diffrent Region, i want to Divert trafic by region.
like American Trafic divert to american Server, African Trafic divert to African Server,
already i'm Used This Service on Oracle Cloud, it's Very Costlly,
so how do i do it , like this, After Create DNS Server.
THanks to you
Ubuntu: Can SSH with IP but not host name - Do you know what could be the issue. I just to do it and now is no | ssh: Could not resolve hostname $NAME$ Name or service not known
If you can connect with IP, but not with host name, then it is a DNS issue. The DNS IP setting on your machine could be wrong, or the DNS server couldn't be contacted by your machine or the DNS server is not configured correctly.
Sir,
i tried doing it on my new system, on nslookup through a different pc the ip address is displayed but the default server is shown as unknown
Please help
Thanks in advance
If nslookup is working properly on the same machine (i.e., server) but not from a different pc, then most likely reason is wrong DNS server IP on the PC. You can try troubleshooting e.g., ping IP, name from same machine and different machine. The result will indicate where the issue is.
I edited the hosts file just like you said and it looks ok with cat but when I run dnsdomainname I dont get anything back. Any ideas?
As long as there was no spelling mistake and the hosts file location was correct, it should work.
I am unable to edit the /etc/hosts file
You can read the error message for your command. It might give you a clue about the issue.
@@HudaTechTalk I fixed it. The command for me is "vi" instead of "vim"
how to make this for dns server for internet?
nice
Nice Video 📹 👍
why can't I ping the dns name from other local machines ?
if you can ping dnsname from the dns server itself, then the DNS server is working, the issue is somewhere else (such as wrong DNS server IP at the client)
@@HudaTechTalk Hey thanks for the reply. It worked, I forget to add the server's dns ip in the client's machine.
Now I want to change that dns name to something else, which files do I need to do the configurations ??
Why do we need DNS server on Ubuntu, what is main purpose?
The purpose of DNS server is the same (i.e., Name to IP translation) irrespective of which OS (Windows/Linux) you implement it in.
Yes 👍.
Ive got an error it says that **server can't find nurul.local: SERVFAIL please help me to fix it...
If you configured for the same domain (nurul.local) and the domain can't be found, then most likely there is some error in your configuration (or the DNS IP in IPv4 setting is wrong). It could be as little as a missing/misplaced dot (.) The best way to figure out is to troubleshoot using ping command (to IP and name) step by step and rule out the places the error might be. Troubleshooting is not a single ping (but a couple of them to different IPs and names) and you need to know which successful/failed ping means what.
@@HudaTechTalk Hi NH, I got the same problem, in relation to your tutorial above, could you please help how to create the right DNS IP in IPv4 setting?
"network unreachable resolving"
my resolv.conf file not contain my server ip adress its all empty file
Hi Maryam, even your resolv.conf file is empty, saving the correct information in it should solve the problem. As you can see, rom time 23:30 I deleted the file and recreated the file content (by copying from file and editing).
After doing all those steps i can't see nslookup result it showing as server can't find SERVFAIIL using of www. If i give direct like testing.local it shows whats the issue here ?
At 23:25 when I put in the command, it says the server can't find my www.(mydomainname)
I got the same issue. Did you ever manage to fix it on your side?
pls help resolve the nxdomain error
Someone need to troubleshoot your system to find out the error.
What about CNAME
CNAME records should point to host records. So, instead of making a host record for www, you can make a CNAME record for www like "www IN CNAME ns-ubuntu20.nurul.local." provided that "ns-ubuntu20" is an existing host (A) record that maps to IP.
@@HudaTechTalk thank you so much, will try that today..I am a student and this video has been really helpful
I edited /etc/hosts but dnsdomainname and hostname would not change.
I'm using ubuntu server
There might be some minor error in your configuration (/etc/bind and/or /etc/hosts). Its hard to locate errors in Linux and so please check carefully.
Not working!
How can i add subdomains ?!
First, if the main domain is not working, then try to fix it, as a minor error such as a missing dot (.) can create problem. Subdomain: If you are thinking of simple purpose for subdomain, such as hosting a website (e.g., site1.example.com) then then you can add multiple Host records mapping to multiple IPs and configure the sites to point to the corresponding records. Please check my video "How to Host Multiple Websites in Ubuntu". If you have some other purpose of subdomain, then add zone files and reverse zone files and their corresponding database files with records.
good job
i have subscribed you also'
Very bad audio and lack of voice clearance.
Thank you for your feedback. Yes, the audio is not great. So, I added subtitle, if that helps.
If it is wrong, then do not publish it
Didn't get the reason/purpose of your comment. I didn't find anything wrong in there. Did you find anything wrong?
bạn gửi mình file code
Translation shows you asked for the code. Sorry, can't send the code and it won't work either. You can try to follow step-by-step carefully for your domain name.
everything works great except this: after i run the symlink command at 25:13 /etc/resolv.conf becomes empty and read only (can't chmod (dangling symlink error)) only delete the file
im on kali and the folder /run/systemd/resolve does not exist like it does on my ubuntu vm, is the equivalent "/usr/lib/systemd/resolv.conf"?
looks like that was it, just replace with sudo ln -sf /usr/lib/systemd/resolv.conf /etc/resolv.conf for kali folks!
@@johnstyl Thanks for the information. It definitely is gonna help Kali Linux users.