DZone Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world

Snippets has posted 5883 posts at DZone. View Full User Profile

Bind Configuration In Order To Resolve All Domains To The Same IP Address

11.19.2009
| 5751 views |
  • submit to reddit
        
// /etc/bind/named.conf
options {
	directory "/var/named";
	dump-file "/var/named/data/cache_dump.db";
	statistics-file "/var/bind/data/named_stats.txt";
};

zone "." IN {
	type master;
	file "fake-master";
	allow-update{ none;};
};

logging {
	channel query_logging {
		file "/var/log/named/named_log" versions 3 size 10M;
		print-category yes;
		print-severity yes;
		print-time yes;
	};
};

// /var/named/fake-master
$TTL 86400
@ IN SOA @ root(
	42 ;serial
	3H ;refresh
	15M ;retry
	1W ;expiry
	1D ) ; minimum
   IN NS localhost
*. IN A 192.168.1.10
*. IN MX 10 localhost