Forum Discussion
IS_38885
Nimbostratus
Jan 20, 2009Problems getting a simple name resolution "example" Irule to work
Hi,
I am trying to implement name resolution inside an iRule and I cannot get to work the simple example I find in the knowledge base.
The example is the following:
when HTTP_REQUEST {
Hold HTTP data until IP address is resolved
HTTP::collect
Start a name resolution on the hostname
NAME::lookup gmail.com
}
when NAME_RESOLVED {
log local0. "IP address list for remotehost.domain.com = >[NAME::response]<"
log local0. "First listed address is >[lindex [NAME::response] 0]<"
log local0. "Second listed address is >[lindex [NAME::response] 1]<"
Release HTTP data once hostname is resolved
HTTP::release
}
I can see in the LTM logs that the response NAME::response is an empty string. The DNS servers seems to be properly configured as I am able to perform nslookup from the SSH console.
I am using 9.4.6
- naladar_65658
Altostratus
The version number you are using looks good and from what I can tell, the code looks good to. I did check out the Wiki article on NAME::lookup and noticed this line and I thought I would point it out. Not all names have corresponding PTR records. Reverse resolutions are easily spoofed not guaranteed to be correct. - IS_38885
Nimbostratus
It works now. - naladar_65658
Altostratus
Glad you figured it out. That's some very useful information to know!
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