home | O'Reilly's CD bookshelfs | FreeBSD | Linux | Cisco | Cisco Exam  


Previous Section Next Section

FEATURE(lookupdotdomain)

Enable .domain secondary access.db lookups V8.12 and above

Normally, lookups of hosts in the access database (Section 7.5) are literal. That is, host.domain is looked up first as host.domain and then as domain. For example, the host hostA.CS.Berkeley.edu would first be looked up as hostA.CS.Berkeley.edu, then as CS.Berkeley.edu, then as Berkeley.edu, and lastly as edu. None of the components is looked up with a leading dot. That is, host.domain's second lookup is domain, not .domain.

If you wish each lookup to also include a lookup of the domain part with a dot prefix, you can declare this lookupdotdomain feature:

FEATURE(`lookupdotdomain')

Once declared, all lookups of hosts in the access database will include another lookup with the domain part prefixed with a dot. That is, for example, without lookupdotdomain declared, the lookups of hostA.CS.Berkeley.edu will look like this:

hostA.CS.Berkeley.edu
CS.Berkeley.edu
Berkeley.edu
edu

But with lookupdotdomain declared, the lookups of hostA.CS.Berkeley.edu will look like this:

hostA.CS.Berkeley.edu
.CS.Berkeley.edu
CS.Berkeley.edu
.Berkeley.edu
Berkeley.edu
.edu
edu

This allows anything.cs.berkeley.edu to be treated differently from cs.berkeley.edu. For example:

.cs.berkeley.edu      REJECT
cs.berkeley.edu       OK

Here, anything that ends in .cs.berkeley.edu will be rejected, whereas anything ending in cs.berkeley.edu will be accepted.

Note that this lookupdotdomain feature requires that the access.db feature be declared first. If you reverse the declarations (this feature first) you will get the following warning and your resulting configuration file will not be what you expect:

*** ERROR: FEATURE(`lookupdotdomain') requires FEATURE(`access_db')

Also note that this lookupdotdomain feature should not be used in conjunction with the relay_hosts_only feature (Section 7.4.6) because that feature disables subdomain lookups. If you declare the relay_hosts_only feature first and then declare this feature, the following warning will be printed:

*** WARNING: FEATURE(`lookupdotdomain') does not work well with FEATURE(`relay_hosts_
only')

If you declare this feature first, then the relay_hosts_only feature, no warning will be printed.

    Previous Section Next Section