-1

I'm trying to configure my bind9 resolution file to take in CNAME and a reverse ipv4 of 192.168.1.112 but everytime i add them it just doesn't work as it shows in the video tutorials

This is my zone file

zone "localhost" {
   type master;
   file "/etc/bind/db.local112.zone";

This is the db.local112.zone

$TTL    604800
@   IN  SOA example.com. root.example.email.com. (
             11     ; Serial
         604800     ; Refresh
          86400     ; Retry
        2419200     ; Expire
         604800 )   ; Negative Cache TTL

IN  NS  example.com.
IN  A   192.168.1.12
IN  A   192.168.1.13

This works fine and outputs the 2 address's listed but this next file outputs nothing, i would like to add an email, CNAME and reverse look up successfully

This is my db.local11.zone re-configured

$TTL    604800
@       IN      SOA     ns.example.com. root.localhost. (
                        111         ; Serial
                     604800         ; Refresh
                      86400         ; Retry
                    2419200         ; Expire
                     604800 )       ; Negative Cache TTL

    IN      NS      example.com.
    IN      A       192.168.1.12
    IN      A       192.168.1.13

ns    IN    A       192.168.1.12

exampleXYZ.com.        IN      CNAME   exampleXYZ.com.
exampleXYZ.com.        IN      A       192.168.1.112


12.      IN     PTR      exampleXYZ.com.

smtp                   IN      A               192.168.10.1
                       IN      MX              10   smtp

After a service bin9 reload i can still use dig on the example.com but not on dig exampleXYZ.com or dig 192.168.1.112

1 Answer 1

2

You have a number of fundamental flaws in here, I'm afraid.

  1. Incorrect zone name:

    zone "localhost" {
       type master;
       file "/etc/bind/db.local112.zone";
    };
    

    The zone name should not be "localhost". Instead, it should be the actual name of your zone (i.e. "example.com").

  2. Improper use of CNAME:

    exampleXYZ.com.        IN      CNAME   exampleXYZ.com.
    exampleXYZ.com.        IN      A       192.168.1.112
    

    First, you have a CNAME which loops back to itself. Second, you cannot mix a CNAME withy any other record set for the same label. For exampleXYZ.com., you can have either an A record, or a CNAME, but not both.

  3. You seem to be mixing data for exampleXYZ.com. into the same zone as example.com. You cannot do this.

  4. You are attempting to put reverse (PTR) records into a forward lookup zone. You cannot do this either. If you want to host reverse lookup records, they need to be in their own zone, such as zone "1.168.192.in-addr.arpa".

If you are serious about managing your own DNS server, I strongly recommend O'Reilly's DNS & BIND , which is a fine book on the subject.

0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .