Return a default record for invalid requests (non existent domain).

Mark_Andrews at isc.org Mark_Andrews at isc.org
Thu Sep 5 06:37:51 UTC 2002


> 
> 
> So does this mean I can return a default record?
> I didn't want to create a zone file for each domain.
> 
> Can BIND do this?

	Not without leaking bogus NS and SOA records for "." which you
	don't want to do.

	If you want to return bogus information do it on a per zone basis.
	You can refer to the same masterfile for each zone.  The most common
	queries are for A, AAAA and MX records.  PTR records in reverse zones.
	Return cachable results for these.
	
	;
	; You want the NS records to expire as fast as possible so
	; when the delegation is fixed they stop trying to use you.
	;
	@ 0 SOA <yournameserver> <yourcontactdetails> (
		0 3600 1200 604800 604800 )
	@ 0 NS <yournameserver>
	;
	@ 604800 A 127.0.0.1
	@ 604800 AAAA ::1
	@ 604800 MX 0 @
	@ 604800 TXT "THIS ZONE WAS INCORRECTLY DELEGATED TO THIS SERVER"
	;
	* 604800 A 127.0.0.1
	* 604800 AAAA ::1
	* 604800 MX 0 @
	* 604800 TXT "THIS ZONE WAS INCORRECTLY DELEGATED TO THIS SERVER"

	Otherwise use a empty zone

	;
	; You want the NS records to expire as fast as possible so
	; when the delegation is fixed they stop trying to use you.
	;
	@ 0 SOA <yournameserver> <yourcontactdetails> (
		0 3600 1200 604800 604800 )
	@ 0 NS <yournameserver>
	;
	@ 604800 TXT "THIS ZONE WAS INCORRECTLY DELEGATED TO THIS SERVER"

--
Mark Andrews, Internet Software Consortium
1 Seymour St., Dundas Valley, NSW 2117, Australia
PHONE: +61 2 9871 4742                 INTERNET: Mark.Andrews at isc.org


More information about the bind-users mailing list