Forum Discussion
rravens_165977
Nimbostratus
Jun 04, 2015need an irule to forward DNS requests based on FQDN
We have the need to forward DNS that comes from a particular subnet (i.e. source = 10.10.10.0/24) to our internal DNS for all queries EXCEPT a list of 20 domain names that need to hit the external to...
cdougall_14195
Cirrus
Jun 04, 2015https://devcentral.f5.com/wiki/iRules.DNS__rrname.ashx
Something like this might work if you've got a GTM.
when DNS_REQUEST {
if { ([IP::addr [IP::client_addr] equals 10.10.10.0/24]) } {
switch -glob [string tolower [DNS::rrname]] {
"www.domain1.com" -
"www.domain2.com" -
"www.domain3.com" -
"www.domain4.com" -
"www.domain5.com" {
pool external_dns_pool
}
default {
pool internal_dns_pool
}
}
}
}
If you're wanting to do something like this on an LTM, you're going to have some troubles. Is there a reason to not have the internal DNS do a recursive lookup for those requests?
Brandon_12607
Nimbostratus
Apr 07, 2016i was trying to add this IRULE on the GTM in DNS -> Delivery -> iRules -> iRule List -> create… gives me an error with the DNS::rrname. I have tried to use DNS::name but gives me an error also. Any thoughts?
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
DevCentral Quicklinks
* 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
Discover DevCentral Connects