Forum Discussion
Selective DNS queries
Hi All, I am trying to route DNS queries to authoritative servers based on DNS/Hostname request. I have run up a 11.5.1 host in AWS and trying to figure out the GTM configuration but I think/hope what I want to do can be achieved by a DNS iRule but having issues figuring it out.
What I want to do is something like below, anything in AWS will use the F5 DNS Virtual Server as the default DNS server and when a DNS request comes in for a amazonaws.com DNS name it routes the request by a DNS server with external DNS resolution capability. If a request comes in to F5 DNS VS with a DNS request for an internal AD dns name it gets routed to our internal DNS servers.
Is this possible ? Something similar to the iRule below hopefully...still getting my head around GTM at the moment.
when DNS_REQUEST {
if { [DNS::question name] contains "amazonaws.com" }
{
pool pool-external-dns
}
else {
pool-default-internal-dns
}
}
3 Replies
- Kevin_Davies_40
Nacreous
Try the following. The pools you are selecting need to be DNS server pools
when DNS_REQUEST { if { [DNS::rrname] ends_with "amazonaws.com" } { pool pool-external-dns } else { pool-default-internal-dns } } - danielpenna
Cirrus
I was getting errors with DNS::rrname so have changed it to [DNS::question name], will test and confirm.
Thanks Kevin
- danielpenna
Cirrus
Awesome Kevin, all working now. Cheers....
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)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