Forum Discussion

Peter_L_71637's avatar
Peter_L_71637
Icon for Nimbostratus rankNimbostratus
Nov 27, 2014

IRule for outgoing traffic

Hello,

 

When I upload the iRule below into my F5 LinkController (11.4.1), i'm getting the following error: 01070151:3: Rule [/Common/outbound_internet2] error: /Common/outbound_internet2:17: error: [missing an expression][ ] /Common/outbound_internet2:18: error: [undefined procedure: [IP::addr [IP::client_addr] equals 8.8.8.8/32] or [IP::addr [IP::client_addr] equals 9.9.9.9/32] and [TCP::local_port] == 25 ][{ [IP::addr [IP::client_addr] equals 8.8.8.8/32] or [IP::addr [IP::client_addr] equals 9.9.9.9/32] and [TCP::local_port] == 25 } { pool outbound_pool_mail } else { pool outbound_pool_rest }]

 

I will describe the iRule for you: I'm using a wildcard virtual server (L4) to direct some kind of traffic to different internet links. Some of the network segments are directed to "outbound_pool_1", segment 7.7.7.7 is a firewall who is setting up a ipsec vpn to a remote location and it is directed to "outboud_pool_vpn". And the last two ip addresses are the mail servers, they are directed to "outbound_pool_mail". All other traffic is using "outbound_pool_rest".

 

So why is the F5 not accepting my iRule, probably i forgot some syntax

 

Greeting Peter

 

================================< IRule Outbound > ================================

 

when CLIENT_ACCEPTED { if { [IP::addr [IP::client_addr] equals 1.1.1.0/24] or [IP::addr [IP::client_addr] equals 2.2.2.0/24] or [IP::addr [IP::client_addr] equals 3.3.3.0/24] or [IP::addr [IP::client_addr] equals 4.4.4.0/24] or [IP::addr [IP::client_addr] equals 5.5.5.0/24] or [IP::addr [IP::client_addr] equals 6.6.6.0/24] } { pool outbound_pool_1 } elseif { [IP::addr [IP::client_addr] equals 7.7.7.7/32] and [UDP::local_port] == 500 } { pool outbound_pool_vpn } elseif { [IP::addr [IP::client_addr] equals 8.8.8.8/32] or [IP::addr [IP::client_addr] equals 9.9.9.9/32] and [TCP::local_port] == 25 } { pool outbound_pool_mail } else { pool outbound_pool_rest } }