[Pdns-users] pdns and default-ttl option

2010-11-04 Thread Dmitriy Lyfar
Hi,

I use pdns with own implemented backend. Queries which is not recognised by
my backend are redirected to the
pdns-recursor. I'd like to change TTL value for all queries and found
default-ttl option which is equal to 3600 by default,
I've changed that to 300, but there is no effect and I still see arbitrary
TTLs in pdns answer:

powerdns.com.2596INA85.17.219.140

Is there any way to have same TTL for all queries I redirected to recursor
(in my backend I set up ttl manually, so no problem with
queries which can be resolved by backend)? Thank you.

-- 
Regards, Lyfar Dmitriy
___
Pdns-users mailing list
Pdns-users@mailman.powerdns.com
http://mailman.powerdns.com/mailman/listinfo/pdns-users


Re: [Pdns-users] pdns and default-ttl option

2010-11-04 Thread Derrik Pates

On 11/4/10 12:47 PM, Dmitriy Lyfar wrote:

I use pdns with own implemented backend. Queries which is not recognised
by my backend are redirected to the
pdns-recursor. I'd like to change TTL value for all queries and found
default-ttl option which is equal to 3600 by default,
I've changed that to 300, but there is no effect and I still see
arbitrary TTLs in pdns answer:

powerdns.com.2596INA85.17.219.140

Is there any way to have same TTL for all queries I redirected to
recursor (in my backend I set up ttl manually, so no problem with
queries which can be resolved by backend)? Thank you.


The TTL indicated in a recursor response tells how long the recursor 
intends to keep that particular cached record for. It counts down from 
the time it was last retrieved from the master. I don't think PowerDNS 
has a mechanism to override that. However, it is there for a reason.


--
Derrik Pates
de...@devrandom.net
___
Pdns-users mailing list
Pdns-users@mailman.powerdns.com
http://mailman.powerdns.com/mailman/listinfo/pdns-users


Re: [Pdns-users] pdns and default-ttl option

2010-11-04 Thread Kenneth Marshall
On Thu, Nov 04, 2010 at 01:15:07PM -0600, Derrik Pates wrote:
 On 11/4/10 12:47 PM, Dmitriy Lyfar wrote:
 I use pdns with own implemented backend. Queries which is not recognised
 by my backend are redirected to the
 pdns-recursor. I'd like to change TTL value for all queries and found
 default-ttl option which is equal to 3600 by default,
 I've changed that to 300, but there is no effect and I still see
 arbitrary TTLs in pdns answer:

 powerdns.com.2596INA85.17.219.140

 Is there any way to have same TTL for all queries I redirected to
 recursor (in my backend I set up ttl manually, so no problem with
 queries which can be resolved by backend)? Thank you.

 The TTL indicated in a recursor response tells how long the recursor 
 intends to keep that particular cached record for. It counts down from the 
 time it was last retrieved from the master. I don't think PowerDNS has a 
 mechanism to override that. However, it is there for a reason.


Yes, and that value is the value that a well behaved DNS client should
use to schedule its next DNS query for that host.

Cheers,
Ken
___
Pdns-users mailing list
Pdns-users@mailman.powerdns.com
http://mailman.powerdns.com/mailman/listinfo/pdns-users


Re: [Pdns-users] pdns and default-ttl option

2010-11-04 Thread Derrik Pates

On 11/4/10 1:32 PM, Dmitriy Lyfar wrote:

Thank you. Is there any way to control TTL for resource records in
recursor? Sometimes I see:

ggg.com http://ggg.com.428271INA212.72.60.198

Where recursor obtains this TTL value?


As I said, it gets it from the authoritative server, then counts down 
over time until it reaches the time where the record is no longer good, 
and it throws it away. I did a quick query for 'ggg.com', and the 
authoritative servers for it provide a TTL of 432000 seconds, so a 
little math shows that the recursor you queried last retrieved that 
record slightly over 1 hour prior. There's not a way in pdns_recursor to 
override what's sent out as the record TTL, but as Kenneth pointed out, 
there's a good reason for clients to be able to see that, so trying to 
override it is probably not a good idea in the long run.


--
Derrik Pates
de...@devrandom.net
___
Pdns-users mailing list
Pdns-users@mailman.powerdns.com
http://mailman.powerdns.com/mailman/listinfo/pdns-users


Re: [Pdns-users] pdns and default-ttl option

2010-11-04 Thread Derrik Pates

On 11/4/10 2:30 PM, abang wrote:

See http://doc.powerdns.com/built-in-recursor.html

max-cache-ttl

Maximum number of seconds to cache an item in the DNS cache, no matter what the 
original TTL specified. Available since 3.2.


But that won't fix the TTL value to always be that specific value in 
returned records, which is what the OP wants.


--
Derrik Pates
de...@devrandom.net
___
Pdns-users mailing list
Pdns-users@mailman.powerdns.com
http://mailman.powerdns.com/mailman/listinfo/pdns-users


Re: [Pdns-users] pdns and default-ttl option

2010-11-04 Thread Kenneth Marshall
On Thu, Nov 04, 2010 at 02:53:00PM -0600, Derrik Pates wrote:
 On 11/4/10 2:30 PM, abang wrote:
 See http://doc.powerdns.com/built-in-recursor.html

 max-cache-ttl
  
 Maximum number of seconds to cache an item in the DNS cache, no matter 
 what the original TTL specified. Available since 3.2.

 But that won't fix the TTL value to always be that specific value in 
 returned records, which is what the OP wants.


You should be able to do that will a lua script in version 3.3 with
the no-cache directive and set the TTL for the packet manually. I
have not tested it personally, but that sounds like it would work.

Cheers,
Ken
___
Pdns-users mailing list
Pdns-users@mailman.powerdns.com
http://mailman.powerdns.com/mailman/listinfo/pdns-users