On 2013-05-19 07:13, manu@... wrote:
> Hi
>
> I am working on nsupdate support in milter-greylist, so that an action
> clause in an ACL can trigger a DNS update, which enables milter-greylist
> to feed a DNSRBL based on ACL conditions.
>
> That first part works fine, but I thought about handling expiration of
> added DNS record. It seems there is no way to tell the DNS that an added
> entry should expire. That would suggest milter-greylist sould manage it,
> which leads to a lot of complexity.
Well, I used dynamic DNS in our LAN to point a service name to
recently-working instances of the service (i.e. "proxy" points
to several SQUID instances if they work), and the script which
does this just tests the service and calls the nsupdate binary:
# case ... 0) # OK
( echo "server $DNSMASTER"
echo "zone $DNSZONE"
echo "update add $DNSZONE. $DNSTTL A $IP"
echo "" ) | nsupdate
;;
*) # FAIL
( echo "server $DNSMASTER"
echo "zone $DNSZONE"
echo "update delete $DNSZONE. A $IP"
echo "" ) | nsupdate
This is on Solaris, but AFAIK the nsupdate part is a standard
BIND one (I did have to update BIND on some older DNS servers
to have it working as I needed). As you can see above, there
is a possibility to set the TTL for an added entry, which I
believe should override the one set in the zone's SOA record.
Your other solution choice is (if you own the DNS zone) to
set those SOA fields to shorter timeouts...
HTH,
//Jim Klimov