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 by 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:
$TTL 3D @ IN SOA ns.freebsd.bogus. hostmaster.freebsd.bogus. ( 199802151 ; Serial, todays date + todays serial 8H ; Refresh 2H ; Retry 4W ; 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 dig again:
$ dig -x 192.168.196.4 +pfmin ;; res options: init recurs defnam dnsrch ;; got answer: ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 8764 ;; QUERY: 1, ANSWER: 1, AUTHORITY: 1, ADDITIONAL: 1 ;; QUERY SECTION: ;; 4.196.168.192.in-addr.arpa, type = ANY, class = IN ;; ANSWER SECTION: 4.196.168.192.in-addr.arpa. 3D IN PTR mail.freebsd.bogus.
so, it looks OK, dump the whole thing to examine that too:
dig -x 192.168.196 AXFR ; <<>> DiG 8.2 <<>> -x AXFR $ORIGIN 196.168.192.in-addr.arpa. @ 3D IN SOA ns.freebsd.bogus. hostmaster.freebsd.bogus. ( 199802151 ; serial 8H ; refresh 2H ; retry 4W ; expiry 1D ) ; minimum 3D IN NS ns.freebsd.bogus. 4 3D IN PTR mail.freebsd.bogus. 2 3D IN PTR ns.freebsd.bogus. 5 3D IN PTR ftp.freebsd.bogus. 3 3D IN PTR donald.freebsd.bogus. 1 3D IN PTR gw.freebsd.bogus. @ 3D IN SOA ns.freebsd.bogus. hostmaster.freebsd.bogus. ( 199802151 ; serial 8H ; refresh 2H ; retry 4W ; expiry 1D ) ; minimum ;; Received 8 answers (8 records). ;; FROM: lookfar to SERVER: 127.0.0.1 ;; WHEN: Sat Dec 16 01:44:03 2000
Looks good! If your output didn't look like that look for error-messages in your syslog, I explained how to do that in the first section under the heading Starting named