pablitop_134672
Apr 14, 2014Nimbostratus
iRule to only allow traffic from 3 differents subnets
I need to create an irule that just allow traffic when its from 3 subnets: 10.10.17.0/24, 10.10.18.0/24 and 10.10.19.0/24. I don´t know if the one below, works like I want. Could anybody please help me? Would you recommend me to use datagroups? Do they affect the cpu?
when HTTP_REQUEST { if { [string tolower [HTTP::path]] ends_with "/xxx" } and { { not [IP::addr [IP::client_addr]/24 equals 10.10.17.0])} and { not [IP::addr [IP::client_addr]/23 equals 10.10.18.0])}{ HTTP::respond 200 content "URL Blocked" } } }
Thanks and regards.