LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 10-02-2023, 07:35 AM   #1
Jason.nix
Member
 
Registered: Feb 2023
Posts: 568

Rep: Reputation: 10
Post A question about DNS server


Hello,
I want to configure a DNS server with the help of https://ubuntu.com/server/docs/servi...me-service-dns article.
I have some questions:

1- In @ IN A 192.168.1.10, is 192.168.1.10 the IP address of the server that wants to be DNS's server?

2- Should the secondary server be configured on another (physical or virtual) server? If yes, then I have to install BIND9 on another server and configure it. Am I right?

3- In zone "1.168.192.in-addr.arpa", why is the IP address reversed? If I change 1.168.192 to 192.168.1, will there be a problem?


Thank you.
 
Old 10-02-2023, 01:19 PM   #2
smallpond
Senior Member
 
Registered: Feb 2011
Location: Massachusetts, USA
Distribution: Fedora
Posts: 4,160

Rep: Reputation: 1266Reputation: 1266Reputation: 1266Reputation: 1266Reputation: 1266Reputation: 1266Reputation: 1266Reputation: 1266Reputation: 1266
1. "@" stands for the domain name; in the sample file it is example.com. It makes the file more generic to use @ than to repeat the name everywhere. There is another line for ns, which is the nameserver.

2. It doesn't make sense to configure a secondary on the same system, since if the primary fails, the secondary fails too.

3. That's how you do reverse lookup, starting with the LSB. It would not work the other way 'round. It's for the same reason that URLs don't go com.google.mail.

Last edited by smallpond; 10-02-2023 at 01:20 PM.
 
1 members found this post helpful.
Old 10-04-2023, 03:13 AM   #3
Jason.nix
Member
 
Registered: Feb 2023
Posts: 568

Original Poster
Rep: Reputation: 10
Quote:
Originally Posted by smallpond View Post
1. "@" stands for the domain name; in the sample file it is example.com. It makes the file more generic to use @ than to repeat the name everywhere. There is another line for ns, which is the nameserver.

2. It doesn't make sense to configure a secondary on the same system, since if the primary fails, the secondary fails too.

3. That's how you do reverse lookup, starting with the LSB. It would not work the other way 'round. It's for the same reason that URLs don't go com.google.mail.
Hello,
Thank you so much for your reply.
Is 192.168.1.10 the IP address of the server that wants to be DNS's server?
 
Old 10-04-2023, 10:34 AM   #4
smallpond
Senior Member
 
Registered: Feb 2011
Location: Massachusetts, USA
Distribution: Fedora
Posts: 4,160

Rep: Reputation: 1266Reputation: 1266Reputation: 1266Reputation: 1266Reputation: 1266Reputation: 1266Reputation: 1266Reputation: 1266Reputation: 1266
This line:
Code:
@       IN      NS      ns.example.com.
says that the nameserver for the domain example.com is ns.example.com.

This line:
Code:
ns      IN      A       192.168.1.10
says that the IPV4 address of ns.example.com is 192.168.1.10.

This line:
Code:
@       IN      A       192.168.1.10
says that the IPV4 address of example.com is also 192.168.1.10.
 
2 members found this post helpful.
Old 10-05-2023, 05:43 AM   #5
Jason.nix
Member
 
Registered: Feb 2023
Posts: 568

Original Poster
Rep: Reputation: 10
Quote:
Originally Posted by smallpond View Post
This line:
Code:
@       IN      NS      ns.example.com.
says that the nameserver for the domain example.com is ns.example.com.

This line:
Code:
ns      IN      A       192.168.1.10
says that the IPV4 address of ns.example.com is 192.168.1.10.

This line:
Code:
@       IN      A       192.168.1.10
says that the IPV4 address of example.com is also 192.168.1.10.
Hello,
Thank you so much for your great help.
As a final question, if the DNS server has access to the Internet, then if the IP address of the DNS server is entered in the client's DNS settings, does the client have access to the Internet?
 
Old 10-05-2023, 05:47 PM   #6
smallpond
Senior Member
 
Registered: Feb 2011
Location: Massachusetts, USA
Distribution: Fedora
Posts: 4,160

Rep: Reputation: 1266Reputation: 1266Reputation: 1266Reputation: 1266Reputation: 1266Reputation: 1266Reputation: 1266Reputation: 1266Reputation: 1266
My bad. Didn't realize you were a troll.
 
Old 10-05-2023, 08:28 PM   #7
scasey
LQ Veteran
 
Registered: Feb 2013
Location: Tucson, AZ, USA
Distribution: CentOS 7.9.2009
Posts: 5,750

Rep: Reputation: 2222Reputation: 2222Reputation: 2222Reputation: 2222Reputation: 2222Reputation: 2222Reputation: 2222Reputation: 2222Reputation: 2222Reputation: 2222Reputation: 2222
Quote:
Originally Posted by Jason.nix View Post
Hello,
Thank you so much for your great help.
As a final question, if the DNS server has access to the Internet, then if the IP address of the DNS server is entered in the client's DNS settings, does the client have access to the Internet?
No. Not if the client doesn’t have ‘net access otherwise.

What are you actually trying to accomplish? Why do you need/want to set up a name server?

I used to maintain a name server for the domains I was hosting n the same system, but realized several problems with that.
First, as has been stated, having the name server on the same box as the domain hosting services results in a single point of failure.
Also, it’s recommended (required?) that a domain name have at least two authoritative name servers (three is better) on different subnets. I only had IP addresses on one public subnet, so I wasn’t meeting that recommendation/requirement.
So I stopped trying to run my own server and began using the Domain Name Server provided by the domain registrar.
And, I was already using the ISPs name server for DNS resolution, because my name server only contained zones for the domains I was hosting.
I still had to learn what entries were needed for the domains I host, and how to accomplish that in the registrar’s system, but I no longer had to maintain the actual name server.

Last edited by scasey; 10-05-2023 at 08:33 PM.
 
1 members found this post helpful.
Old 10-05-2023, 09:03 PM   #8
slac-in-the-box
Member
 
Registered: Mar 2010
Location: oregon
Distribution: slackware64-15.0 / slarm64-current
Posts: 781
Blog Entries: 1

Rep: Reputation: 432Reputation: 432Reputation: 432Reputation: 432Reputation: 432
https://bind9.readthedocs.io/en/v9.18.19/
 
Old 10-06-2023, 08:35 AM   #9
Jason.nix
Member
 
Registered: Feb 2023
Posts: 568

Original Poster
Rep: Reputation: 10
Quote:
Originally Posted by scasey View Post
No. Not if the client doesn’t have ‘net access otherwise.

What are you actually trying to accomplish? Why do you need/want to set up a name server?

I used to maintain a name server for the domains I was hosting n the same system, but realized several problems with that.
First, as has been stated, having the name server on the same box as the domain hosting services results in a single point of failure.
Also, it’s recommended (required?) that a domain name have at least two authoritative name servers (three is better) on different subnets. I only had IP addresses on one public subnet, so I wasn’t meeting that recommendation/requirement.
So I stopped trying to run my own server and began using the Domain Name Server provided by the domain registrar.
And, I was already using the ISPs name server for DNS resolution, because my name server only contained zones for the domains I was hosting.
I still had to learn what entries were needed for the domains I host, and how to accomplish that in the registrar’s system, but I no longer had to maintain the actual name server.
Hello,
Thank you so much for your reply.
I want DNS for an internal network. Something similar to the Windows domain. Clients become members of your domain.

Last edited by Jason.nix; 10-06-2023 at 08:37 AM.
 
Old 10-06-2023, 08:35 AM   #10
Jason.nix
Member
 
Registered: Feb 2023
Posts: 568

Original Poster
Rep: Reputation: 10
Quote:
Originally Posted by smallpond View Post
My bad. Didn't realize you were a troll.
Hello,
No, I'm not.
 
Old 10-06-2023, 11:33 AM   #11
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,454

Rep: Reputation: 2353Reputation: 2353Reputation: 2353Reputation: 2353Reputation: 2353Reputation: 2353Reputation: 2353Reputation: 2353Reputation: 2353Reputation: 2353Reputation: 2353
Don't use dns - it doesn't apply. Use /etc/hosts.
 
1 members found this post helpful.
Old 10-07-2023, 06:30 AM   #12
Jason.nix
Member
 
Registered: Feb 2023
Posts: 568

Original Poster
Rep: Reputation: 10
Quote:
Originally Posted by business_kid View Post
Don't use dns - it doesn't apply. Use /etc/hosts.
Hello,
Thank you so much for your reply.
Can you explain more?
 
Old 10-07-2023, 12:45 PM   #13
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,454

Rep: Reputation: 2353Reputation: 2353Reputation: 2353Reputation: 2353Reputation: 2353Reputation: 2353Reputation: 2353Reputation: 2353Reputation: 2353Reputation: 2353Reputation: 2353
I'll try.

Back in the 1970s there was no dns. Every machine had the "entire internet" in /etc/hosts. I got an archive of an Industrial system from 1974 and /etc/hosts was the biggest file at 200k. cc was about 10k, and everything was miniscule by comparison.

Today we have /etc/host.conf, with the line
Code:
order hosts, bind
That means when looking for a 'name to ip' lookup, check /etc/hosts first, then go to bind(DNS). The internet is on dns. Your local network doesn't have publicly available IPs, does it? So put them in /etc/hosts, and mark the problem solved
 
1 members found this post helpful.
Old 10-07-2023, 04:24 PM   #14
wpeckham
LQ Guru
 
Registered: Apr 2010
Location: Continental USA
Distribution: Debian, Ubuntu, RedHat, DSL, Puppy, CentOS, Knoppix, Mint-DE, Sparky, VSIDO, tinycore, Q4OS, Manjaro
Posts: 5,765

Rep: Reputation: 2764Reputation: 2764Reputation: 2764Reputation: 2764Reputation: 2764Reputation: 2764Reputation: 2764Reputation: 2764Reputation: 2764Reputation: 2764Reputation: 2764
I have set up a DNS server for my local network using DNSMASQ. Bind is overkill for local use, and far harder to manage.

(But if you want to use it, managing it via WEBMIN is a treat!)
 
2 members found this post helpful.
Old 10-08-2023, 01:00 PM   #15
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,454

Rep: Reputation: 2353Reputation: 2353Reputation: 2353Reputation: 2353Reputation: 2353Reputation: 2353Reputation: 2353Reputation: 2353Reputation: 2353Reputation: 2353Reputation: 2353
Agreed - Bind is overkill. I liked DJB's play on it.
Quote:
Originally Posted by Daniel J. Bernstein
Buggy Internet Name Daemon
But /etc/hosts never caught up, did it? And that's what I was trying to explain.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Doggo Is A DNS Lookup Utility With Colorful Output, DNS-overTLS and DNS-over-HTTPS Support LXer Syndicated Linux News 0 04-07-2021 02:30 AM
Question about dns domain and sub-domain on different DNS server speed12sil Linux - Server 5 04-29-2013 05:44 PM
help needed to setup a DNS server can anyone say how to configure a DNS server subha Linux - Networking 4 04-27-2012 11:50 PM
Win2k3 DNS + PFsense DNS Forwarder = No internal DNS resolution Panopticon Linux - Networking 1 11-19-2007 09:59 PM
DNS Server: How to Redirect to MY DNS SERVER? Dimitriy Linux - Networking 1 06-14-2006 05:47 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 11:24 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration