LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 11-12-2016, 08:47 PM   #1
ilos28
LQ Newbie
 
Registered: Nov 2016
Posts: 8

Rep: Reputation: Disabled
Error from master file (DNS)


Hi guys.

I'm kinda new here. I'm learning to configure a DNS server in debian with VirtualBox, but when I tried to use "dig siomaraalonso.org NS" from a DNS's "client" (pc1) it didn't work. This is the error:

Code:
; <<>> DiG 9.8.4-rpz2+rl005.12-P1 <<>> siomaraalonso.org NS
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: SERVFAIL, id: 43279
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 0

;; QUESTION SECTION:
;siomaraalonso.org.		IN	NS

;; Query time: 0 msec
;; SERVER: 192.168.2.1#53(192.168.2.1)
;; WHEN: Sun Nov 13 01:18:15 2016
;; MSG SIZE  rcvd: 35
When I tracked the error I got this from the main DNS server:

Code:
dns_rdata_fromtext: /etc/bind/db.siomaraalonso.org:24: near '192.168.2.2': not a valid number
zone siomaraalonso.org/IN: loading from master file /etc/bind/db.siomaraalonso.org failed: not a valid number
zone siomaraalonso.org/IN: not loaded due to errors.

This is my configuration from /etc/bind/named.conf.local:

Code:
// Direct
zone "siomaraalonso.org"{
        type master;
        file "/etc/bind/db.siomaraalonso.org";
};

// Reverse
zone "2.168.192.in-addr.arpa"{
        type master;
        file "/etc/bind/192.168.2-inversa";
};

This one is from my master file called db.siomaraalonso.org:

Code:
;
; BIND data file for siomaraalonso.org
;
$TTL    604800
@       IN      SOA     siomaraalonso.org. root.siomaraalonso.org. (
                                1       ; Serial
                           604800       ; Refresh
                            86400       ; Retry
                          2419200       ; Expire
                           604800 )     ; Negative Cache TTL
;
                        NS      pcserver.siomaraalonso.org
                        NS      server2.siomaraalonso.org

pcserver        IN      A       192.168.2.1
server2         IN      A       192.168.2.2
pc1             IN      A       192.168.2.101
pc2             IN      A       192.168.2.102
pc3             IN      A       192.168.2.103
pc4             IN      A       192.168.2.104

www             IN      A       192.168.2.101
ftp             IN      A       192.168.2.101
mail            IN      MX      192.168.2.2

My main DNS is called pcserver and its IP is 192.168.2.1 and the second DNS is server2 and its IP is 192.168.2.2.


I have tried to change a lot of things from that files but whatever I do it doesn't work.

I need some help.

Last edited by ilos28; 11-12-2016 at 08:49 PM.
 
Old 11-13-2016, 02:51 AM   #2
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
Hi,

The error means that you miss the MX priority number.
But using named-checkzone, you could see also that assigning MX to an IP is not correct too.
You also miss some trailing dots.

Anyway assuming that your MX is called mail, here is a correct zone file:
Code:
;
; BIND data file for siomaraalonso.org
;
$TTL    604800
@       IN      SOA     siomaraalonso.org. root.siomaraalonso.org. (
                                2       ; Serial
                           604800       ; Refresh
                            86400       ; Retry
                          2419200       ; Expire
                           604800 )     ; Negative Cache TTL
;
                        NS      pcserver.siomaraalonso.org.
                        NS      server2.siomaraalonso.org.

pcserver       IN      A       192.168.2.1
server2         IN      A       192.168.2.2
pc1               IN      A       192.168.2.101
pc2               IN      A       192.168.2.102
pc3               IN      A       192.168.2.103
pc4               IN      A       192.168.2.104

www            IN      A       192.168.2.101
ftp                IN      A       192.168.2.101
siomaraalonso.org.           IN      MX    10 mail
mail          IN    A     192.168.2.1
Of course you should give mail the correct A RR

Regards
 
Old 11-13-2016, 05:30 AM   #3
ilos28
LQ Newbie
 
Registered: Nov 2016
Posts: 8

Original Poster
Rep: Reputation: Disabled
Yes, it worked!! The problem was this "siomaraalonso.org. IN MX 10 mail", as you said, (and for the dots too).

Actually, the exercise says that I have to configurate the second DNS (server2) as a mail exchange, for this reason I had to add the 192.168.2.2 (server2 IP) in this line: "mail IN A 192.168.2.2". When I used "named-checkzone siomaraalonso.org /etc/bind/db.siomaraalonso.org" it didn't point any problem.


But thanks a lot for your time and for your help.

Last edited by ilos28; 11-13-2016 at 05:32 AM.
 
Old 11-13-2016, 07:42 AM   #4
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
Quote:
Originally Posted by ilos28 View Post
Yes, it worked!! The problem was this "siomaraalonso.org. IN MX 10 mail", as you said, (and for the dots too).

Actually, the exercise says that I have to configurate the second DNS (server2) as a mail exchange, for this reason I had to add the 192.168.2.2 (server2 IP) in this line: "mail IN A 192.168.2.2". When I used "named-checkzone siomaraalonso.org /etc/bind/db.siomaraalonso.org" it didn't point any problem.


But thanks a lot for your time and for your help.
Cool!
You may mark the thread "SOLVED" from the Thread Tools on top of the page

Regards
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
I find file zone in the slave zone to the do a transfer of zone from Windows Server 2012 as master dns and CentOS as slave DNS. To learn Linux - Newbie 1 09-02-2016 09:36 AM
DNS master CentOs and a Slave DNS in Windows Server 2012 Or vice versa To learn Linux - Server 2 09-01-2016 09:28 AM
DNS master CentOs and a Slave DNS in Windows Server 2012 Or vice versa. To learn Linux - Newbie 1 08-31-2016 02:37 AM
how to configure master dns in windows2003 server and its slave dns in rhel5 suneellinux Linux - Newbie 1 04-11-2008 05:13 PM
HELP: slave DNS is not updating Zone FIle from Master Cypher12 Linux - Networking 2 09-12-2006 06:12 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 09:12 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