The zones.rfc1918
file is a preconfigured zone file in BIND9 that contains definitions for reverse mapping of private IP addresses defined in RFC 1918 (10.0.0.0/8, 172.16.0.0/12, and 192.168.0.0/16). Its primary purposes are:
- Preventing accidental exposure of internal DNS queries to the public internet
- Blocking reverse DNS lookups for private addresses from reaching root servers
- Supporting split-DNS configurations in view-based setups
When using views with RFC1918 subnets, common errors occur because:
// Typical error example
named[1234]: zones.rfc1918:10: zone '10.in-addr.arpa/IN': already exists
This happens when your view configuration overlaps with the default zones.rfc1918 definitions.
Here's how to properly integrate RFC1918 addresses with views:
// named.conf options snippet
include "/etc/bind/zones.rfc1918";
view "internal" {
match-clients { 192.168.1.0/24; 10.0.0.0/8; };
recursion yes;
// Override specific RFC1918 zones for this view
zone "10.in-addr.arpa" {
type master;
file "/etc/bind/internal/db.10";
};
};
view "external" {
match-clients { any; };
recursion no;
};
When working with RFC1918 addresses in BIND9:
- Keep the zones.rfc1918 include but override specific zones in views
- Ensure each view has its own copy of reverse zone files
- Use explicit zone definitions rather than relying on defaults
For Ubuntu 10.04 LTS specifically:
# Check for syntax errors
named-checkconf /etc/bind/named.conf
# Verify zone files
named-checkzone example.com /etc/bind/zones/db.example.com
# Reload configuration
/etc/init.d/bind9 reload
The zones.rfc1918
file is a default configuration component in BIND9 that defines authoritative DNS zones for reverse mapping of private IP addresses (RFC1918 ranges). These include:
- 10.0.0.0/8
- 172.16.0.0/12
- 192.168.0.0/16
When implementing DNS views for different subnets (common in enterprise environments), the zones.rfc1918
file becomes particularly relevant. BIND9 uses this file to:
- Prevent accidental exposure of internal DNS data to external clients
- Handle reverse DNS lookups for private addresses consistently
- Maintain proper zone authority boundaries
Here's how to properly configure views while accounting for RFC1918 zones:
// named.conf.local excerpt
view "internal" {
match-clients { 192.168.1.0/24; 10.0.0.0/8; };
include "/etc/bind/zones.rfc1918";
zone "example.local" {
type master;
file "/etc/bind/db.example.local";
};
};
view "external" {
match-clients { any; };
recursion no;
zone "example.com" {
type master;
file "/etc/bind/db.example.com";
};
};
Problem: Errors about missing RFC1918 zone authority
Solution: Either:
- Keep the default
zones.rfc1918
inclusion, or - Explicitly define the zones in your view configuration
For complete control, you might create custom versions:
zone "10.in-addr.arpa" { type master; file "db.empty"; };
zone "16.172.in-addr.arpa" { type master; file "db.empty"; };
zone "168.192.in-addr.arpa" { type master; file "db.empty"; };
Including zones.rfc1918
has minimal performance impact as:
- The zones are typically empty or contain minimal records
- They only affect reverse DNS queries for private addresses
- Modern BIND9 implementations handle these efficiently
The file serves as a safeguard rather than an operational burden, helping maintain DNS hygiene in environments using private addressing.