Forum Discussion
John_T__Morgan_
Nimbostratus
Oct 27, 2017IRule to disallow access to a resource based on IP address
Hi All,
We have hundreds of laptops distributed with the f5 Edge client installed. Unfortunately, we can not find a way to lock down the options to "Disconnect, Auto-Connect, and Connect". No ...
crodriguez
Oct 27, 2017Ret. Employee
Is it just one subnet that you want to block access from? If so, a datagroup is unnecessary. Usually data groups are used when you have more than about a dozen comparisons to make, otherwise an IF or SWITCH statement is usually sufficient. If using datagroups, you are better off using the CLASS command rather than MATCHCLASS which is deprecated (although still allowed to support older iRules).
If just checking against one subnet, you could the IP::addr command to test the client's IP address against the "bad" subnet:
if { [IP::addr [IP::client_addr] equals "10.10.0.0/16"] } {
}
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