Forum Discussion
jmaynard_44588
Nimbostratus
Jan 11, 2012Blocking IP's
How do I create an iRule for blocking a list of internet IP addresses?
3 Replies
- The_Bhattman
Nimbostratus
There are several different ways. However, we there are people in the forum that have done this. Here is a path to the forumn
http://devcentral.f5.com/Community/GroupDetails/tabid/1082223/asg/50/afv/topic/aft/1174760/aff/5/showtab/groupforums/Default.aspx
I hope this helps
Bhattman - Colin_Walker_12Historic F5 AccountYou'll want to look at the drop or reject command in conjunction with IP::client_addr, most likely:
http://devcentral.f5.com/wiki/iRules.drop.ashx
http://devcentral.f5.com/wiki/iRules.reject.ashx
http://devcentral.f5.com/wiki/iRules.IP__client_addr.ashx
And yes, Bhattman is right, there are lots of examples floating around. :)
Colin - hoolio
Cirrostratus
If you have a set of client IPs you want to block, you could add them to an address type data group and then use the class command to check the client IP:
http://devcentral.f5.com/wiki/iRules.class.ashx
Here's an example:
http://devcentral.f5.com/wiki/iRules.AccessControlBasedOnNetworkOrHost.ashx
Aaron
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)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