Forum Discussion
Garth_104943
Nimbostratus
Feb 18, 2010Name resolution based on source IP
Newbie question, but please let me know if this is possible.
I have a domain www.mydomain.com that resolves publicly to one address (akamai cached)
The same domain www.mydomain....
hoolio
Cirrostratus
Feb 18, 2010You could take the name lookup functionality from the first Codeshare example below and modify it to do a lookup every X seconds as in the second example:
http://devcentral.f5.com/wiki/default.aspx/iRules/DestinationSnatUsingDNS.html
http://devcentral.f5.com/wiki/default.aspx/iRules/LogEveryXSeconds.html
You might also want to consider upgrading to 10.1 to use the new RESOLV::lookup command:
http://devcentral.f5.com/wiki/default.aspx/iRules/resolv__lookup
Like the NAME::lookup command, RESOLV::lookup performs a DNS query, returning the A record for the indicated hostname, or the PTR record for the indicated IP address. The functional difference between the two is that RESOLV::lookup suspends and returns the result inline, whereas NAME::lookup continues and eventually causes NAME_RESOLVED to fire and then you need to call NAME::response to retrieve it.
Aaron
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
