ltm rule event DNS RESPONSE
iRule(1) BIG-IP TMSH Manual iRule(1)
DNS_RESPONSE
Triggered when the system responds to a DNS request.
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.
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
}
HINTS
Note: This event triggers only in the context of LTM iRules.
SEE ALSO
CHANGE LOG
@BIGIP-11.1.0 --First introduced the event in both LTM and GTM.
BIG-IP 2017-01-31 iRule(1)