LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 11-20-2018, 08:51 PM   #1
catiewong
Member
 
Registered: Aug 2018
Posts: 190

Rep: Reputation: Disabled
name server configuration


The below is my named server configuration .

#vi /etc/named.conf

Code:
acl "trusted" {
        192.168.1.100;    # ns1 - can be set to localhost
"
};
"

 allow-query     { any; };
"

include "/etc/named/named.conf.local";
#vi /etc/named/named.conf.local

Code:
zone "mydomain.com" {
    type master;
    file "/etc/named/zones/db.mydomain.com"; # zone file path

 };


# vi /etc/named/zones/db.mydomain.com

Code:
@       IN      SOA     ns1.mydomain.com. admin.mydomain.com. (
                              3         ; Serial
             604800     ; Refresh
              86400     ; Retry
            2419200     ; Expire
             604800 )   ; Negative Cache TTL

; name servers - NS records
    IN      NS      ns1.mydomain.com.

; name servers - A records
ns1.mydomain.com.          IN      A       192.168.1.100
test.mydomain.com    IN A    192.168.1.100


I use another server which in the same subnet , I added the below line in /etc/resolv.conf , it do not work.

Code:
nameserver 192.168.1.100
it works if I added this lines .

Code:
server mydomain.com
nameserver 192.168.1.100
I just would like to ask , why I need to add "server mydomain.com" to resolv.conf , if I setup the name server IP address ( 192.168.1.100 ) in our client ( the client server may be is windows server ) , how to set "server mydomain.com" in client side ? or is it the reason that it needs the line "server mydomain.com" is because my name server configuration has problem ?

Last edited by catiewong; 11-20-2018 at 09:04 PM.
 
Old 11-20-2018, 09:54 PM   #2
berndbausch
LQ Addict
 
Registered: Nov 2013
Location: Tokyo
Distribution: Mostly Ubuntu and Centos
Posts: 6,316

Rep: Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002
You say “it doesn’t work”. Precisely what doesn’t work?

What do you do, what do you expect to happen, what happens in reality?

I have to guess. The command ping test tells you that it doesn’t know test. If so, it’s because your DNS server has no record for test. It only has a record for test.mydomain.com. For this reason, you have to tell your resolver to automatically add mydomain.com. But I am not sure what doesn’t work and have to guess.

Regarding Windows, I googled windows dns client configuration and found this very informative site. mydomain.com is the primary DNS suffix.

Last edited by berndbausch; 11-20-2018 at 10:01 PM.
 
Old 11-21-2018, 07:06 AM   #3
TenTenths
Senior Member
 
Registered: Aug 2011
Location: Dublin
Distribution: Centos 5 / 6 / 7
Posts: 3,474

Rep: Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553
You also have a mistake in the last line of your zone file:

This:
Code:
test.mydomain.com    IN A    192.168.1.100
Should be this:
Code:
test.mydomain.com.    IN A    192.168.1.100
You can also leave the .mydomain.com. part out of any records as this is implied.

So you could just use:
Code:
test    IN A    192.168.1.100
 
  


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
Name server configuration problem rushenas Linux - Networking 2 07-27-2008 11:43 PM
Clarification reg changing the existing name server to a new name server bzlaskar Linux - Server 1 06-19-2007 03:11 PM
Same Domain name configuration for local and registered server and Mx rec configure cbekannan Linux - Software 0 02-07-2005 04:46 AM
hosting and ping samba server name as well as mail server name simultaneously cbekannan Linux - General 2 01-11-2005 12:11 AM
name server in Slackware. Configuration question zyrtech Slackware 4 05-16-2003 09:26 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 06:25 PM.

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