[Pdns-users] Help with Pipe Backend

Aki Tuomi cmouse at youzen.ext.b2.fi
Wed Aug 21 06:42:13 UTC 2013


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 at mailman.powerdns.com
> http://mailman.powerdns.com/mailman/listinfo/pdns-users
> 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://mailman.powerdns.com/pipermail/pdns-users/attachments/20130821/0ad4903d/attachment-0001.sig>


More information about the Pdns-users mailing list