GTM irule to log source IP address of DNS server querying a WIP and Answer back
hello folks,
need some help to finish a GTM irule to log in console the source IP address of DNS servers querying my WIP, their location and the answer resolved by the GTM based on the WIP logic (topo records).
this is what I have now:
when DNS_REQUEST {
log local0. "QUERY from: [IP::remote_addr] - LOCATION: [whereis [IP::remote_addr]] - QUESTION: [DNS::question name], [DNS::question type]"
}
and this is what I get in console:
<DNS_REQUEST>: QUERY from: 180.108.0.18 - LOCATION: AS CN Shanghai {} - QUESTION: abcde.test.domain.com, A
I've been struggling to find out how to include the resolution to the question abcde.test.domain.com (Which is my WIP).
the answer is one of 2 pool members included included in the WIP.
any help is highly appreciated.
thanks! - alex.