Forum Discussion

MK04_258228's avatar
MK04_258228
Icon for Nimbostratus rankNimbostratus
Jun 20, 2016

Help with DNS Irule logging

Hi , I have a 2 DC with 1 GTM each . I am facing a issue where my GTM is resolving all DNS request coming from inside the DCs ,either DC1 or DC2 to a WIDEIP : "wide-IP" in DC1 . I want to write an irule on the GTM that will log the GTM DNS activity when it receives a DNS request with source of DC2 .

 

Thanks, Mk.

 

2 Replies

  • Something like this (replace 10.10.10.10 with IP that you want to monitor):

    when DNS_REQUEST {
    if { [IP::addr [IP::remote_addr] equals 10.10.10.10] } {
    log local0. "[IP::remote_addr] - [DNS::question name]"
    }
    }
    
  • Try something like this: (Based on this link😞

    when DNS_RESPONSE {
    log local0. "LDNS: [IP::remote_addr] - LOCATION: [whereis [IP::remote_addr]] - QUESTION: [DNS::question name], [DNS::question type] - ANSWER: [DNS::answer]"
    }