PTR for localhost

Chris Thompson cet1 at cam.ac.uk
Thu Mar 26 15:20:53 UTC 2009


On Mar 26 2009, Matus UHLAR - fantomas wrote:

>On 26.03.09 21:34, dev_null at zoho.com wrote:
>> In recent version of Bind-9.6, is it needed for reverse parsing config of
>> localhost? for example,
>> 
>> zone "0.0.127.IN-ADDR.ARPA" {
>>         type master;
>>         file "local.rev";
>> };
>
>I think it's not, but it's alwayt better to have it.
>However, the builtin default zone name is "127.in-addr.arpa" and I prefer
>creating this one.

I prefer to use:

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

zone "1.0.0.127.in-addr.arpa" {
        type master; file "db.localhost-rev"; };

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 "db.localhost-rev"; };

with just the two master files:

(db.localhost)

; Like empty zone, but modified for zone "localhost"
@ 86400 SOA  localhost. . 0 28800 7200 604800 86400
@     0 NS   localhost.
@ 86400 A    127.0.0.1
@ 86400 AAAA ::1

(db.localhost-rev)

; Like empty zone, but modified for reverse lookup of "localhost" (IPv4 or IPv6)
@ 86400 SOA  localhost. . 0 28800 7200 604800 86400
@     0 NS   localhost.
@ 86400 PTR  localhost.

-- 
Chris Thompson
Email: cet1 at cam.ac.uk



More information about the bind-users mailing list