Forum Discussion
smiley_dba_1116
Nimbostratus
Nov 01, 2012iRule detect any IP that comes in at x rate a minute
Lets say we have an external IP coming in and is completely over taxing a VS. Is there a way within an iRule(or profile) to throttle the connection? In this case
external ---------------------------> VS
166.166.166.166 -------------->270.270.270.270
Using up to 300 MB of bandwidth. Want to throttle to 50mb. Thank you for anyone who can help.
RGW
5 Replies
- nitass
Employee
is this applicable?
Simple traffic shaping by JackofallTrades
https://devcentral.f5.com/wiki/iRules.Simple_traffic_shaping.ashx - What_Lies_Bene1
Cirrostratus
Alternatively you could create a Rate Class and apply it in the iRule, based on the source IP. Is the high bandwidth inbound or outbound? - smiley_dba_1116
Nimbostratus
Its inbound - smiley_dba_1116
Nimbostratus
Its inbound - What_Lies_Bene1
Cirrostratus
OK, so I knocked this up;when CLIENT_ACCEPTED { if { [IP::addr [IP::client_addr] equals x.x.x.x] } { rateclass name_of_your_rateclass log local0. "Bandwidth Hog: [IP::client_addr] detected, Rate Class applied." } }
And found this right afterwards (which has an example which is essentially the same): https://devcentral.f5.com/wiki/iRules.rateclass.ashx
No idea what happens if the client opens multiple connections. Perhaps you can let us know?
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