LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 05-16-2019, 11:23 AM   #1
archai
LQ Newbie
 
Registered: May 2019
Posts: 3

Rep: Reputation: Disabled
BIND - not working correctly


Hi Guys,

First time installing and configuring bind and it's not working correctly.
Please find below me conf files:

/etc/named.conf:
Code:
// vim:set ts=4 sw=4 et:

options {
    directory "/var/named";
    pid-file "/run/named/named.pid";

    // Uncomment these to enable IPv6 connections support
    // IPv4 will still work:
    //  listen-on-v6 { any; };
    // Add this for no IPv4:
    //  listen-on { none; };

    allow-recursion { 127.0.0.1; 192.168.43.0/24; };
    allow-transfer { none; };
    allow-update { none; };
    listen-on { 127.0.0.1; };
    forwarders { 8.8.8.8; 8.8.4.4; };

    version none;
    hostname none;
    server-id none;
};

zone "localhost" IN {
    type master;
    file "localhost.zone";
};

zone "0.0.127.in-addr.arpa" IN {
    type master;
    file "127.0.0.zone";
};

zone "1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.ip6.arpa" {
    type master;
    file "localhost.ip6.zone";
};

zone "255.in-addr.arpa" IN {
    type master;
    file "empty.zone";
};

zone "0.in-addr.arpa" IN {
    type master;
    file "empty.zone";
};

zone "." IN {
    type hint;
    file "root.hint";
};

//zone "example.org" IN {
//    type slave;
//    file "example.zone";
//    masters {
//        192.168.1.100;
//    };
//    allow-query { any; };
//    allow-transfer { any; };
// cata.local

zone "cata.example" IN {
        type master;
        file "cata.example";
        allow-update { none; };
        allow-query { any; };
        allow-transfer { any; };

};

zone "43.168.192.in-addr.arpa" IN {
        type master;
        file "reverse-192.168.43";
        allow-update { none; };
};

/var/named/cata.example:
Code:
;       Zone File for "example.com" - Internal Use ONLY
;
$TTL 1D
@             IN      SOA       galaxy.cata.example.  sysadmin.cata.example.  (
                                10             ; Serial
                                8H             ; Refresh
                                2H             ; Retry
                                4W             ; Expire
                                1D )           ; Minimum
;
              IN      NS       galaxy.cata.example.          ; Name Server for the domain
              IN      MX  10   galaxy.cata.example.          ; Mail Exchange
;
cata.example.   IN      A        192.168.43.21     ; IP address for the domain 'example.com'
galaxy        IN      A        192.168.43.21     ; IP address for 'galaxy'
www           IN      CNAME    galaxy          ; 'galaxy' is also known as www
ftp           IN      CNAME    galaxy          ; 'galaxy' is also known as ftp
;
catamac      IN      A        192.168.43.73   ; MANUAL IP address entry for 'wkstn1'
;wkstn2        IN      A        192.168.1.202   ; MANUAL IP address entry for 'wkstn2'
~

/var/named/reverse-192.168.43:

Code:
;       Reverse File for network "192.168.43.0/24" - Internal ONLY
;
$TTL 1D
@             IN      SOA       galaxy.cata.example.  sysadmin.cata.example.  (
                                10             ; Serial
                                8H             ; Refresh
                                2H             ; Retry
                                4W             ; Expire
                                1D )           ; Minimum
;
              IN      NS        galaxy.cata.example.
;galaxy.cata.dia.       IN      A       192.168.43.21
21            IN      PTR       galaxy.cata.example.
;
73            IN      PTR       catamac.cata.example.     ; MANUAL entry for 'cata_mac' reverse delegation
;202           IN      PTR       wkstn2.example.com.     ; MANUAL entry for 'wkstn2' reverse delegation
When I ran 'dig www.cata.example'
Code:
; <<>> DiG 9.14.1 <<>> www.cata.example
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 36279
;; flags: qr rd ra; QUERY: 1, ANSWER: 2, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 1280
;; QUESTION SECTION:
;www.cata.example.              IN      A

;; ANSWER SECTION:
www.cata.example.       0       IN      A       86.35.3.191
www.cata.example.       0       IN      A       86.35.3.190

;; Query time: 49 msec
;; SERVER: 192.168.43.1#53(192.168.43.1)
;; WHEN: Thu May 16 19:11:39 EEST 2019
;; MSG SIZE  rcvd: 77
These IPs are incorrect:
www.cata.example. 0 IN A 86.35.3.191 <---
www.cata.example. 0 IN A 86.35.3.190 <---


Code:
systemctl restart systemd-resolved.service
[root@cataarch ~]# nslookup galaxy.cata.example
Server:         192.168.43.1
Address:        192.168.43.1#53

** server can't find galaxy.cata.example: NXDOMAIN

[root@cataarch ~]# nslookup galaxy.cata.example
Server:         192.168.43.1
Address:        192.168.43.1#53

** server can't find galaxy.cata.example: NXDOMAIN
Could you please help me with this issue, I have no experience with it and I am clueless now.


Thank You,

Catalin
 
Old 05-16-2019, 04:41 PM   #2
smallpond
Senior Member
 
Registered: Feb 2011
Location: Massachusetts, USA
Distribution: Fedora
Posts: 4,143

Rep: Reputation: 1264Reputation: 1264Reputation: 1264Reputation: 1264Reputation: 1264Reputation: 1264Reputation: 1264Reputation: 1264Reputation: 1264
Is there an NS record in the example top-level domain for subdomain cata.example that points to your nameserver? Otherwise it won't be found.
 
1 members found this post helpful.
Old 05-16-2019, 09:37 PM   #3
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
Quote:
Originally Posted by archai View Post

First time installing and configuring bind and it's not working correctly.
Though you have a tentative answer, you might want to consider describing what exactly doesn’t work as expected.
 
Old 05-16-2019, 11:58 PM   #4
archai
LQ Newbie
 
Registered: May 2019
Posts: 3

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by smallpond View Post
Is there an NS record in the example top-level domain for subdomain cata.example that points to your nameserver? Otherwise it won't be found.
To be honest I am really new to this and I am not sure. Can you please tell me in more detail what do I need to do to check and create this?
 
Old 05-17-2019, 12:04 AM   #5
archai
LQ Newbie
 
Registered: May 2019
Posts: 3

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by berndbausch View Post
Though you have a tentative answer, you might want to consider describing what exactly doesn’t work as expected.
Hi, thank you for your reply. I thought there was in my post everything: configuration files: /etc/named.conf, /var/named/cata.example, /var/named/reverse-192.168.43. Their content was written with the 'code' indentation. And the outputs of: dig www.cata.example which shows below the IPs returned are incorrect and then nslookup which doesn't find the server. So what doesn't work is that the IP's returned are not the ones of my server and in the second nslookup command the server is not found.
Not sure what else to say to describe better.
 
Old 05-17-2019, 01:35 AM   #6
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
Sorry, I didn't see that you had the description of your problem in the question. Just ignore me
 
Old 05-17-2019, 02:28 AM   #7
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 archai View Post
Hi, thank you for your reply. I thought there was in my post everything: configuration files: /etc/named.conf, /var/named/cata.example, /var/named/reverse-192.168.43. Their content was written with the 'code' indentation. And the outputs of: dig www.cata.example which shows below the IPs returned are incorrect and then nslookup which doesn't find the server. So what doesn't work is that the IP's returned are not the ones of my server and in the second nslookup command the server is not found.
Not sure what else to say to describe better.
You get a response to your queries from a resolver at 192.168.43.1:
Quote:
nslookup galaxy.cata.example
]Server: 192.168.43.1
Address: 192.168.43.1#53

** server can't find galaxy.cata.example: NXDOMAIN

[root@cataarch ~]# nslookup galaxy.cata.example
Server: 192.168.43.1
Address: 192.168.43.1#53

** server can't find galaxy.cata.example: NXDOMAIN
Make sure you put your authoritative nameserver (192.168.43.21) first in the client's /etc/resolv.conf


Regards
 
  


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
[SOLVED] Help me to correctly se 'tmount --bind' in /etc/fstab igadoter Slackware 1 10-31-2018 12:05 PM
[SOLVED] BIND~~ Bind working on Localhost but not not working from remotehost abhishekdixit98 Linux - Server 7 09-01-2015 04:04 AM
[SOLVED] Wicd won't install correctly/run correctly (64-bit Slackware 13) bgraybr Slackware 3 04-01-2010 06:57 PM
Raw socket and bind question, how to implement correctly. coolsti Linux - Networking 1 06-28-2009 11:49 PM

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

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