Forum Discussion
Sergi0
Nimbostratus
Oct 31, 2017GTM and static resolve ip
Can we use GTM for resolve ip without health monitor?
I am interested in create wip with rules
if request for company.com from 10.10.10.0/24 resolve 10.1.1.1 if request from 10.20.20.0/24 resolve ...
crodriguez
Oct 31, 2017Ret. Employee
I think you can do this without pool members at all. Simply use a GSLB iRule on the company.com wide IP to do the resolution statically. For example, something like this:
when DNS_REQUEST {
if { [DNS::question name] ends_with ".company.com" } {
if { [IP::addr [IP::client_addr] equals 10.10.10.0/24] } {
host 10.1.1.1
} elseif { [IP::addr [IP::client_addr] equals 10.20.20.0/24] } {
host 10.2.2.2
}
}
}
`
Adjust the comparison operator after the "ends_with" depending on your wide IP configuration. The only outstanding question is what you want to do if the query is for company.com but not from either of the two networks. You could always add an else condition that returned a REFUSED response. For example:
`} else {
DNS::header rcode REFUSED
DNS::return
}
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