Forum Discussion
Robert_47833
Dec 02, 2011Altostratus
how to use [IP::client_addr] match one subnet
hi,dear irule
if { [IP::client_addr] not equals 10.0.0.0/8 } {
xxxxx
}
how to achieve this? it is a segment with network mask
nitass
Dec 02, 2011Employee
can you try this?
[root@ve1023:Active] config b rule myrule list
rule myrule {
when CLIENT_ACCEPTED {
log local0. "[IP::client_addr]"
if {not [IP::addr [IP::client_addr] equals 172.28.19.0/24]} {
log local0. "[IP::client_addr] does not match 172.28.19.0/24"
} else {
log local0. "[IP::client_addr] matches 172.28.19.0/24"
}
}
}
Dec 1 21:22:54 local/tmm info tmm[23027]: Rule myrule : 172.28.19.80
Dec 1 21:22:54 local/tmm info tmm[23027]: Rule myrule : 172.28.19.80 matches 172.28.19.0/24
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