Forum Discussion
Ken_Wong_48678
May 11, 2007Historic F5 Account
iRules for rate shaping
Hi,
I have an iRule that can be used to control the bandwidth usage by ip address. But, a customer is asking that their users use proxy servers to access internet. All traffic is come from a proxy server ip, I have an idea to suggest they enable the XForwarded For header in proxy servers and LTM inspect the header to apply the rate class. Has anyone tries before or is there any other suggestions? Thanks in advance.
Regards,
Ken
rule Rateshaping_IP {
Paying users get the bandwidth
User's IPs defined in the iRules/DataGroups
when CLIENT_ACCEPTED {
if { [[IP::client_addr] eq matchclass gold_users] } {
rateclass rateshape_10mb
}
elseif { [[IP::client_addr] eq matchclass silver_users] } {
rateclass rateshape_512k
}
elseif { [[IP::client_addr] eq matchclass lump_o_coal_users] } {
rateclass rateshape_128k
}
else {
discard
}
}
}
- Colin_Walker_12Historic F5 AccountInspecting the XForwarded-For header would be a trivial change as far as the code is concerned, although it would require the association of an HTTP profile with the Virtual the rule is applied to, which could add a slight increase in load.
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