Forum Discussion

sabinen_128031's avatar
sabinen_128031
Icon for Nimbostratus rankNimbostratus
Jan 07, 2005

Socket 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_127134's avatar
    bl0ndie_127134
    Historic F5 Account
    Try this out
    when CLIENT_ACCEPTED { 
       if { [IP::remote_addr] equals "66.251.110.118"} { 
         pool security 
       } 
       else { 
         pool Amberpoint 
       } 
     }
  • unRuleY_95363's avatar
    unRuleY_95363
    Historic F5 Account
    IP 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 
        } 
     }