On 2018-06-05 9:57 AM, Anthony fajri wrote:
Hi Expert,
we are using PDNS for our 3GPP DNS Server.
we are using PDNS 2.9.22.6 on Centos 5.

we want to achieve following objective:
- to return TTL of SOA record as 60s for specific IP
- to return TTL of SOA record as 7 days for all IP

our configuration is as following:
if(($qtype eq "SOA" || $qtype eq "ANY") && ($qname =~ /epc.mnc001.mcc001.3gppnetwork.org/ <http://epc.mnc001.mcc001.3gppnetwork.org/>)) {         if($ip eq "200.200.100.1" || $ip eq "200.200.100.5" || $ip eq "200.200.100.6" || $ip eq "200.200.99.1" || $ip eq "200.200.99.4" || $ip eq "200.200.99.7" || $ip eq "10.4.7.200") {
                 if($qtype eq "SOA") {
#                       print "DATA\t$qname\t$qclass\tSOA\t20\t1\tgrxdns1.epc.mnc001.mcc001.3gppnetwork.org <http://tgrxdns1.epc.mnc001.mcc001.3gppnetwork.org>. postmaster.epc.mnc001.mcc001.3gppnetwork.org <http://postmaster.epc.mnc001.mcc001.3gppnetwork.org>. 2013050400 3600 3600 604800 600\n";                         print "DATA\t$qname\t$qclass\tSOA\t60\t1\tgrxdns1.epc.mnc001.mcc001.3gppnetwork.org <http://tgrxdns1.epc.mnc001.mcc001.3gppnetwork.org>. postmaster.epc.mnc001.mcc001.3gppnetwork.org <http://postmaster.epc.mnc001.mcc001.3gppnetwork.org>. 2018060100 900 900 1800 60\n";
                 }
         } else {
                print "DATA\t$qname\t$qclass\tSOA\t604800\t1\tgrxdns1.epc.mnc001.mcc001.3gppnetwork.org <http://tgrxdns1.epc.mnc001.mcc001.3gppnetwork.org>. postmaster.epc.mnc001.mcc001.3gppnetwork.org <http://postmaster.epc.mnc001.mcc001.3gppnetwork.org>. 2013050400 3600 3600 604800 600\n";
   }
}


however, the result is inconsistent.
sometime it returns the exepcted value (TTL of 60 second), but some other time it returns with default value.

I'm guessing that super old version still has a packet cache on it, so that's where it's going to cache your response regardless of source IP address for a period of time. It may or may not be possible to disable that on that version.
_______________________________________________
Pdns-users mailing list
[email protected]
https://mailman.powerdns.com/mailman/listinfo/pdns-users

Reply via email to