You *must* reply with SOA and A record when asked for ANY if the SOA
record name matches the query. You should check the QNAME as well, and
reply with relevant records. 

Aki 

On Tue, Aug 20, 2013 at 01:45:08PM -0700, flair0303 wrote:
> Thank guys. I finally got it working on pdns v3.3. For the curious, here's
> the perl script that works:
> 
> #!/usr/bin/perl
> 
> use warnings;
> use strict;
> 
> $|=1;                                 # no buffering
> 
> my $line=<>;
> chomp($line);
> 
> unless($line eq "HELO\t1") {
>       print "FAIL\n";
>       print STDERR "Received '$line'\n";
>       <>;
>       exit;
> }
> print "OK     Pipe backend firing up\n";      # print our banner
> 
> while(<>)
> {
>       print STDERR "$$ Received: $_";
>       chomp();
>       my @arr=split(/\t/);
>       if(@arr<6) {
>               print "LOG      PowerDNS sent unparseable line\n";
>               print "FAIL\n";
>               next;
>       }
> 
>       my ($type,$qname,$qclass,$qtype,$id,$ip)=split(/\t/);
> 
>       if ($qtype eq "A" || $qtype eq "ANY") {
>               print STDERR "$$ Sent A records\n";
>               print "DATA\t$qname\t$qclass\tA\t3600\t-1\t192.168.1.69\n";
>       }
>         elsif($qtype eq "SOA") {
>               print
> "DATA\t$qname\t$qtype\t86400\t-1\tns1.domain.com.\thostmaster.domain.com.\t0\t10800\t3600\t604800\t3600\n";
>         }
> 
>       print STDERR "$$ End of data\n";
>       print "END\n";
> }
> 
> 
> 
> --
> View this message in context: 
> http://powerdns.13854.n7.nabble.com/Help-with-Pipe-Backend-tp10264p10283.html
> Sent from the PowerDNS mailing list archive at Nabble.com.
> 
> _______________________________________________
> Pdns-users mailing list
> Pdns-users@mailman.powerdns.com
> http://mailman.powerdns.com/mailman/listinfo/pdns-users
> 

Attachment: signature.asc
Description: Digital signature

_______________________________________________
Pdns-users mailing list
Pdns-users@mailman.powerdns.com
http://mailman.powerdns.com/mailman/listinfo/pdns-users

Reply via email to