Forum Discussion
Irule Request
Hi,
I have a Big IP LTM 3600. I want to build an irule with the following requirements,
1- Allow IPs only from America and India. 2- Allow only certain IP addresses from India 3- Allow 10.0.0.0/8 for access from inside 4- Disallow everything else.
Any help would be highly appreciated.
Thanks, Maz
2 Replies
- R_Eastman_13667Historic F5 AccountWhat is your software version?
- Arie
Altostratus
I'm not sure how allowing Indian IP-addresses (requirement 1) correlates to 2 (allow only certain addresses from India), so I've split them up.
1) & 3) & 4)
when HTTP_REQUEST { if { [whereis [IP::client_addr] country] equals "US" || [whereis [IP::client_addr] country] equals "IN" || [IP::addr [IP::client_addr] equals 10.0.0.0/8]} { iRule functionality here } else { reject } }2) Create a data class "class_IndiaIpWhitelist" for this that contains the IP-addresses you want to allow.
when HTTP_REQUEST { if { [class match [IP::client_addr] equals class_IndiaIpWhitelist] { iRule functionality here } else { reject } }
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
* 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