Forum Discussion
Leilow214 - this has been hanging out for a while - have you figured out a path forward?
If not...let me know if anything has changed since the 9th and I'll see if I can find someone to lend a hand.
Hey Lief,
Good day!
Thanks for checking out on my question, I havent tested any solutions yet. But here's what Irule I did, Im not sure if this would work.
Name: CNAME_DNSX_iRule
when DNS_REQUEST {
if { ([string toupper [DNS::question type]] eq "CNAME") }
{
DNS::disable dnsx
}
}
Thank you.
- JRahmAug 16, 2022Admin
yes, that should work fine, DNS iRules processing is handled up front (as shown in this lightboard lesson). You can further refine by extending your if condition to the targeted domain in the query received if necessary.
I'm pretty sure DNS::question type returns all caps already, but you could test to make sure and then eliminate the extra string command for the comparison.
- Leilow214Aug 16, 2022Altostratus
Hi JRahm,
Good day!
Thank you for the response, appreciate it. How do I refine it only for the targeted domain? Can you share the commands/syntax please?
Regards,
Leo
- JRahmAug 16, 2022Admin
something like this should work for you, I threw in my.domain.com as a test condition.
when DNS_REQUEST { if { ([string toupper [DNS::question type]] eq "CNAME") && ([string toupper [DNS::question name]] eq "my.domain.com")} { DNS::disable dnsx } }
Again...i'd test to see how DNS::question returns values, and if all caps or all lower case on each sub-command (type, name, etc) then you can safely remove the string toupper to avoid the additional operations.