Forum Discussion
sabinen_128031
Nimbostratus
Jan 07, 2005Socket Connection Errors on iRule
I am trying to write a rule to route requests through an Amberpoint agent before load balancing. When I put the rule into effect, the BigIP appears to stop routing, and I get socket errors.
when CLIENT_ACCEPTED {
if { [[IP::remote_addr] eq 66.251.110.118] } {
pool security
}
else {
pool Amberpoint
}
}
The intended basic flow is:
client -> BigIP -> Amberpoint -> BigIP -> security pool
The 66.251.110.118 IP address in the rule is the Amberpoint agent.
Here is the working v4.5 rule:
if (client_addr == 66.251.110.118) {
use pool security
}
else {
use pool Amberpoint
}
Any suggestions?
3 Replies
- bl0ndie_127134Historic F5 AccountTry this out
when CLIENT_ACCEPTED { if { [IP::remote_addr] equals "66.251.110.118"} { pool security } else { pool Amberpoint } }
- unRuleY_95363Historic F5 AccountIP address comparison should really be done with the IP::addr command. Using the Tcl native equals operator compares as a string not as an IP address. Thus it should look like this:
when CLIENT_ACCEPTED { if { [IP::addr [IP::remote_addr] equals 66.251.110.118] } { pool security } else { pool Amberpoint } }
- sabinen_128031
Nimbostratus
That worked! Thanks!
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