Forum Discussion
James_21682
Nimbostratus
May 21, 2009Restrict access to VIP by source IP address
Afternoon,
I want to restrict access to a vip to only certain IP addresses, I have done that with the following iRule ( I took it from this forum)
when HTTP_REQUEST {
if { [IP::client_addr] eq "192.168.0.30" || [IP::client_addr] eq "192.168.3.10" || [IP::client_addr] eq "192.168.4.13" || [IP::client_addr] eq "192.168.5.16" } {
pool testapps2s
} else {
HTTP::respond 200 content "Not AllowedYou are not allowed to access this site!"
}
}
I want to add 3 different subnets to the above IPs (say 192.168.7.0, 192.168.9.0 and 102.168.12.0). How would I accomodate that in the iRule - I am a novice when it comes to this so any help would be appreciated.
Thanks
- hoolio
Cirrostratus
Hi,
Recent Discussions
Related Content
DevCentral Quicklinks
* 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
Discover DevCentral Connects