Forum Discussion
Chris_Phillips
Nimbostratus
Feb 16, 2006Forward using hostname as node, not IP
Hi,
I require the ability to create a forwarding server to forward traffic to a hostname rather than an IP address. A third party we are connecting to provides resilience to their syst...
Chris_Phillips
Nimbostratus
Mar 09, 2006Hi,
Thanks for the advice so far, but something is not working right. My iRule as it stands reads like this:
when RULE_INIT {
set ::hostname "example.com"
set ::max 10
set ::count 0
set ::server_ip "192.168.0.1"
}
when CLIENT_ACCEPTED {
node $::server_ip 80
incr ::count
if { $::count == $::max } {
set ::count 0
NAME::lookup $::hostname
}
}
when NAME_RESOLVED {
log local0. "NAME_RESOLVED: [NAME::response]"
set ::server_ip [NAME::response]
}
It works fine to start with, and after the max limit is reached the lookup fires off. I then get the NAME_RESOLVED event, yet NAME::response returns nothing, and the whole thing chokes. i can dig the destination hostname on the box no problem, so would assume that there is no inherent problem on the box in terms of dns resources. Additionally i would assume that that event would only be triggered on a valid resolution, not every single return value. Any clues guys?
Thanks
Chris
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