IP Address range in iRules - ACL's

Hi Guys,

Just wondering if there was a way to specify IP ranges instead of subnets?

Essentially I want to specify in APM ACL’s ranges such as 10.10.1.25-50 or 192.168.1.100-200 so not sure if you can do this in dynamic ACL within APM or iRules set on the LTM VS?

thanks,

B

Hi,

You have 2 choices :

The first one is to use classes, and the second one is to use this :

set ip [IP::client_addr]
set lastoctet [getfield $ip "." 4]
if { not ((($lastoctet >= 25) && ($lastoctet <= 50)) || (($lastoctet >= 100) && ($lastoctet <= 200)) } { 
  reject;
}

You have to use it into an iRule which will check the subnet first otherwise you will authorize everything ending by $lastoctet

wow thanks for the speedy and perfect reply!

B