Help setting up reverse lookup with BIND9

6,458

rev.1.168.192.in-addr.arpa:

$TTL 86400
@           IN    SOA    group2.lab.  root (
              2009031001 ; serial
          28800 ; refresh
          14400 ; retry
          3600000 ; expire
          86400 ; ttl
          )
        IN    NS    192.168.1.3.
1           IN    PTR   ns1.group2.lab.

should be:

$TTL 86400
@           IN    SOA    group2.lab.  root (
              2009031001 ; serial
          28800 ; refresh
          14400 ; retry
          3600000 ; expire
          86400 ; ttl
          )
        IN    NS    192.168.1.3.
3           IN    PTR   ns1.group2.lab.

Thanks for at least taking a look guys, after spending countless hours/days on this, I figured it out...the 1 should've been a 3 :).

Share:
6,458

Related videos on Youtube

Juan
Author by

Juan

Updated on September 18, 2022

Comments

  • Juan
    Juan over 1 year

    First off, I'm still a newbie when it comes to Ubuntu. I would appreciate if someone could show me what I'm doing wrong. I have a Windows 10 machine as my main machine, and I run two VMs with VMWare, one of them is Ubuntu server, and the other is Ubuntu client. I've managed to successfully set up the DHCP server so far. I'm stuck with setting up the DNS server, I managed to get the hostname nslookup (i.e. ns1) to work correctly, however, I have NOT been able to get the nslookup 192.168.1.3 (i.e IP address) to work correctly. Here is what is currently in my settings:

    named.conf.local:

    //The following code defines the forward lookup zone.
    zone “group2.lab” {
    type master;
    file “/etc/bind/zones/group2.lab.db”;
    };
    
    //The following code defines the reverse lookup zone.  
    zone “1.168.192.in-addr.arpa” {
    type master;
    file “/etc/bind/zones/rev.1.168.192.in-addr.arpa”;
    };
    

    group2.lab.db:

    $TTL 86400
    @      IN   SOA   group2.lab. root (
              2 ; serial
              28800 ; refresh
              14400 ; retry
              3600000 ; expire
              86400 ; ttl
              )
           IN   NS    192.168.1.3.
           IN   MX    10  group2.lab.
    ns1    IN   A     192.168.1.3
    www    IN   CNAME ns1
    

    rev.1.168.192.in-addr.arpa:

    $TTL 86400
    @           IN    SOA    group2.lab.  root (
                  2009031001 ; serial
              28800 ; refresh
              14400 ; retry
              3600000 ; expire
              86400 ; ttl
              )
            IN    NS    192.168.1.3.
    1           IN    PTR   ns1.group2.lab.
    

    resolv.conf:

    nameserver 192.168.1.3
    nameserver 8.8.8.8
    search group2.lab
    

    hostname:

    ubuntu
    

    hosts:

    127.0.0.1      localhost
    127.0.1.1      ubuntu
    192.168.1.3    ns1.group2.lab ns1
    
    # The following lines are desirable for IPv6 capable hosts
    ::1     ip6-localhost ip6-loopback
    fe00::0 ip6-localnet
    ff00::0 ip6-mcastprefix
    ff02::1 ip6-allnodes
    ff02::2 ip6-allrouters
    

    This is what I see when I attempt an nslookup:

    root@ubuntu:~# nslookup ns1
    Server: 192.168.1.3
    Address:    192.168.1.3#53
    
    Name:   ns1.group2.lab
    Address:    192.168.1.3
    
    root@ubuntu:~# nslookup 192.168.1.3
    Server: 192.168.1.3
    Address:    192.168.1.3#53
    
    ** server can't find 3.1.168.192.in-addr.arpa.: NXDOMAIN
    

    Does anyone have any ideas? Any help is greatly appreciated. Thank you!