Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I am try to create a reverse-lookup file in BIND, but I need it to point to many networks not just one.

I have three networks that connected to the same bind server, 192.168.3 and 192.168.4 and 192.168.1. I would like that in one reverse-lookup file I could refer to all of the clients at the three networks. Currently I have no idea on how to write that zone file, what I have is:

168.192.in-addr.arpa. SOA dns1.mynetwork.unix admin.mynetwork.unix
1.4.168.192 IN PTR  dns1.mynetwork.unix 
11.3  IN PTR client.mynetwork.unix

When I start the bind server, it gives me an error message on the log file at /var/log/messeges/ that says:

loading from master file named.168.192 faild: not a valid number

I have omitted the other unrelated (IMO) stuff from the configuration file.

To sum it up, i would concise the question to be, is it possible to create a reverse dns file (in bind) that can point to a different networks ? if yes what do i need to change in the example above ?

share|improve this question

1 Answer 1

up vote 2 down vote accepted

The SOA record you posted is incorrect; it needs to be of the form:

zone IN SOA auth-server. admin.address (serial refresh retry expiry minTTL)

After you have edited the zonefile you can check it with named-checkzone zonename filename.

To answer the main point of your question, yes you can do what you want in a single zone. A /24 or larger can be contained within a single zone, although it is usual to separate them out. For networks smaller than a /24 it's a bit trickier but doable (by using CNAMEs).

Here's an example zone:

; Zonefile for 168.192.in-addr.arpa.
@               IN      SOA     ns1.example.com. hostmaster.example.com. (
                        2011121101      ; serial
                                1H      ; refresh (1h)
                                10M     ; retry (10m)
                                1W      ; expire (1w)
                                30M )   ; minimum (30m)

@               IN      NS      ns1.example.com.
@               IN      NS      ns2.example.com.

1.1             IN      PTR     host1-1.example.com.
2.1             IN      PTR     host1-2.example.com.

1.2             IN      PTR     host2-1.example.com.
2.2             IN      PTR     host2-2.example.com.

1.3             IN      PTR     host3-1.example.com.
2.3             IN      PTR     host3-2.example.com.

Have a look at the BIND ARM (Administrator's Reference Manual). This is the canonical reference for BIND.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.