How to configure bind9 so that all DNS requests initiated to it return a fixed IP address? Some tips can be used.
The following is a configuration example:
First, configure named. conf in the main configuration file:
Zone "." {type master; file "/etc/named. fakeroot ";};
The above Zone "." refers to any zone that is not defined in named. conf. This zone configuration is used in this way: When the Domain Name Server cannot resolve the DNS request, it will want the Root Domain Name Server to initiate a request, Zone ".. However, we have modified this part.
Then configure the domain name in the file/etc/named. fakeroot.
@ In SOA ns.domain.com. hostmaster.domain.com. (1 3 H 1 H 1 W 1D) in NS x. y. Z. A * in a x. y. Z. B
The above @ refers to the name of the zone corresponding to the SOA record.
All a record requests sent to the Domain Name Server will return the IP address of x. y. Z. B.