Changing output of bind

Andy Shellam (Mailing Lists) andy.shellam-lists at mailnetwork.co.uk
Mon Dec 11 13:52:23 CET 2006


 From my experience as a programmer, if you don't know why you're doing 
something, it's impossible to do it correctly.

The example you've shown us is a zone file.
It only returns the relevant part of the zone in answer to a query - so 
if a user requests, "wwww.<the_domain>" they will get "wwww IN A 
195.110.192.3" returned.

I think what you've been asked to do is try and catch all spelling 
errors of a request, so if user types in "wwww.yourdomain.com" instead 
of "www.domain.com" they will get the correct record.
This is a different thing to rewriting the named output, and the answer 
lies in creating additional records for each "mistake" possibility in 
your zone file either through scripting or manual input.

RZ wrote:
> Hi,
>
> i'm a dns newbie but a (medium experienced) c programmer.
> I was told to change named output in that way that it will return
> something like the following example (if i remember things right it
> should give an authoritative answer for domains contained in a file). I
> _thought_ it would not be too much an effort to change the named output
> in an appropriate way - but at the moment i'm really lost.
>
> What the use of this ? - i honestly don't know.
>
>
> ;      @(#)named.hosts,v 6.1 1993/08/25 16:51:44 stevea Exp - STREAMware
> TCP/IP  source
> ;      SCCS IDENTIFICATION
> ;
> ; BIOS
> ;
>
> @		IN SOA	ns1.web.at.	hostmaster.biosnet.at. (
> 			2006090101      ; Serial
> 			28800   ; Refresh
> 			7200	; Retry
> 			604800  ; Expire
> 			86400)	; Minimum
> 		IN NS	ns1.web.at.
> 		IN NS	ns2.web.at.
> 		IN A    195.110.192.3
>                 IN   TXT   "v=spf1 -all"
>
> ;
>
> ;
> ww                  IN   A	195.110.192.3
> www                 IN   A	195.110.192.3
> wwww                IN   A	195.110.192.3
> www2                IN   A	195.110.192.3
> ;
>
>
>
>   
>> It might help if you explain what you're trying to achieve by doing this.
>>
>> When a host requests "www.*" then it'll be given the appropriate records
>>     
> >from your zone file.
>   
>> If a client requests a different host but gets "www" instead it'll
>> confuse things.
>>     
>
> !DSPAM:37,457d52da30865856815904!
>
>
>   


-- 
Andy Shellam
NetServe Support Team

the Mail Network
"an alternative in a standardised world"

p: +44 (0) 121 288 0832/0839
m: +44 (0) 7818 000834


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null





More information about the Users mailing list