David_Oertli_18
Apr 10, 2017Nimbostratus
Solved
iRule to route based on CIDR notation
I am trying to create an iRule to allow testing of our application from internal IP addresses but not from anything external. The scenario is that if a client attempts to access our application from ...
- Apr 10, 2017
The is already a default data class built into the F5 for private address space called private_net.
when CLIENT_ACCEPTED { if { [class match [IP::client_addr] equals private_net] } { pool application-server_pool } else { pool sorry-server_pool } }
You can use this or roll your own. See under iRules -> Data Group List. Address based data groups are designed for IP address matching. If a client address matches a subnet in the address data group then this will return true. The same applies if it is a single host as well.