DNS_RESPONSE¶
Description¶
Triggered when the system responds to a DNS request.
When using this event in an LTM iRule on a DNS listener, either a GTM
license or DNS Services addon license must be enabled. When using this
event in an LTM iRule a DNS profile must be enabled on the listener.
Note: This event triggers only in the context of LTM iRules.
Examples¶
when DNS_RESPONSE {
if { [LB::server addr] equals "10.10.10.10" } {
log local0. "Alert: [DNS::rrname] resolved to backup server"
}
}
Change the ttl of all answer records and add a glue record
when DNS_RESPONSE {
set rrs [DNS::answer]
foreach rr $rrs {
DNS::ttl $rr 1234
}
set new_rr [DNS::rr "bigip3900-30.f5net.com. 88 IN A 1.2.3.4"]
DNS::additional insert $new_rr
}