ltm rule command DNS log
iRule(1) BIG-IP TMSH Manual iRule(1)
DNS::log
Controls log publisher in DNS log profile.
SYNOPSIS
DNS::log (MESSAGE)?
DESCRIPTION
There are two version of this command. DNS::log by itself returns a
boolean indicating whether a DNS Logging Profile is configured in the
DNS profile. DNS::log with an argument logs a message to that log
publisher.
Syntax
DNS::log
* Returns a boolean indicating whether a DNS Logging Profile is configured in the DNS profile.
DNS::log []
* Logs a message to the DNS log publisher
RETURN VALUE
VALID DURING
EXAMPLES
# Send one or more IP addresses for a response to an A query
# Use on an LTM virtual server with a DNS profile enabled
when DNS_REQUEST {
# Log query details
DNS::log "DNS question name: [DNS::question name],
DNS question class: [DNS::question class],
DNS question type: [DNS::question type]"
# Generate an answer with two A records
DNS::answer insert "[DNS::question name]. 111 [DNS::question class] [DNS::question type] 1.1.1.1"
DNS::answer insert "[DNS::question name]. 111 [DNS::question class] [DNS::question type] 1.1.1.2"
# Stop further processing of the query after this iRule and send the answer to the client
DNS::return
return
}
HINTS
SEE ALSO
CHANGE LOG
@BIGIP-11.3.0 --First introduced the command.
BIG-IP 2017-01-31 iRule(1)