Forum Discussion
Can the GTM respond to MX requests?
I have two LTMs set up with the following VIPs: Site A - 1.1.1.1 tcp/25 Site B - 2.2.2.2 tcp/25
I've been unable to configure my GTMs to respond to DNS MX requests.
I'd like to build an iRule, but upon reading the comments on the following page tells me that an iRule is only going to trigger if someone performs an "A" DNS query type. - https://devcentral.f5.com/questions/dns_request
GTM version 11.2.0
- Philippe_CLOUPEmployee
Hi Adam, If you have the license for DNS iRules (with DNS Services or GTM for example) then you should use that kind of iRule, and it works (tested it in my lab in 11.4):
when DNS_REQUEST { if { ([string tolower [DNS::question type]] eq "mx") && ([string tolower [DNS::question name]] eq "test.intra")} { DNS::answer clear set new_rr_1 [DNS::rr "mx.test.intra 100 IN MX 100 mx1.test.intra"] set new_rr_2 [DNS::rr "mx.test.intra" MX IN 600 "150 10.1.1.1"] set new_rr_1a [DNS::rr "mx1.test.intra" A IN 300 "10.10.10.10"] set new_rr_2a [DNS::rr "mx2.test.intra" A IN 50 "10.10.10.11"] DNS::answer insert $new_rr_1 DNS::additional insert $new_rr_1a DNS::answer insert $new_rr_2 DNS::additional insert $new_rr_2a DNS::header aa 1 DNS::return } }
Recent Discussions
Related Content
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com