DNS HOWTO : A simple domain. : The reverse zone
Previous: Our own domain
Next: Words of caution

4.3. The reverse zone

Now programs can convert the names in freebsd.bogus to addresses which they can connect to. But also required is a reverse zone, one making DNS able to convert from an address to a name. This name is used buy a lot of servers of different kinds (FTP, IRC, WWW and others) to decide if they want to talk to you or not, and if so, maybe even how much priority you should be given. For full access to all services on the Internet a reverse zone is required.

Put this in named.conf:


zone "196.168.192.in-addr.arpa" {
	notify no;
        type master;
        file "192.168.196";
};

This is exactly as with the 0.0.127.in-addr.arpa, and the contents are similar:


@	IN	SOA	ns.freebsd.bogus. hostmaster.freebsd.bogus. (
			199802151 ; Serial, todays date + todays serial
			8H	; Refresh
			2H      ; Retry
			1W	; Expire
			1D)	; Minimum TTL
		NS      ns.freebsd.bogus.

1		PTR	gw.freebsd.bogus.
2		PTR	ns.freebsd.bogus.
3		PTR	donald.freebsd.bogus.
4		PTR	mail.freebsd.bogus.
5		PTR	ftp.freebsd.bogus.

Now you restart your named (ndc restart) and examine your work with nslookup again:


> 192.168.196.4
Server:  localhost
Address:  127.0.0.1

Name:    mail.freebsd.bogus
Address:  192.168.196.4

so, it looks OK, dump the whole thing to examine that too:


> ls -d 196.168.192.in-addr.arpa
[localhost]
$ORIGIN 196.168.192.in-addr.arpa.
@                       1D IN SOA       ns.freebsd.bogus. hostmaster.freebsd.bogus. (
                                        199802151       ; serial
                                        8H              ; refresh
                                        2H              ; retry
                                        1W              ; expiry
                                        1D )            ; minimum

                        1D IN NS        ns.freebsd.bogus.
1                       1D IN PTR       gw.freebsd.bogus.
2                       1D IN PTR       ns.freebsd.bogus.
3                       1D IN PTR       donald.freebsd.bogus.
4                       1D IN PTR       mail.freebsd.bogus.
5                       1D IN PTR       ftp.freebsd.bogus.
@                       1D IN SOA       ns.freebsd.bogus. hostmaster.freebsd.bogus. (
                                        199802151       ; serial
                                        8H              ; refresh
                                        2H              ; retry
                                        1W              ; expiry
                                        1D )            ; minimum

Looks good! If your output didn't look like that look for error-messages in your syslog, I explained how to do that at the very beginning of this chapter.


DNS HOWTO : A simple domain. : The reverse zone
Previous: Our own domain
Next: Words of caution