Forum Discussion
Ken_50869
Nimbostratus
Aug 14, 2007Compress content by IP
Hello,
I've created the following iRULE to compress content based on the client's source IP address. However, as soon as I apply the iRULE to the virtual server, client's are no longer able to reach the application. Can anyone verify that my syntax is correct, or if anything else could be wrong?
Thanks in advance...
when HTTP_RESPONSE {
if {[IP::client_addr] eq "192.168.10.0/255.255.255.0"} {
COMPRESS::enable}
elseif {[IP::client_addr] eq "192.168.20.0/255.255.255.0" } {
COMPRESS::enable}
else {
COMPRESS::disable}
}
2 Replies
- hoolio
Cirrostratus
You can check the /var/log/ltm log file for TCL errors generated from your iRule. It's also viewable in the GUI under system >> logs >> local traffic.
You can use the IP::addr command (Click here) to compare IP addresses.
Here's an example:if {[IP::addr [IP::client_addr]/24 equals 192.168.10.0] \ or [IP::addr [IP::client_addr]/24 equals 192.168.20.0]}{ log local0. "matched for [IP::client_addr]" COMPRESS::enable } else { log local0. "didn't match for [IP::client_addr]" COMPRESS::disable }
Aaron - Ken_50869
Nimbostratus
Outstanding!
The new rule that you posted worked. After applying it to the virtual server, the application works.
Thank you very much for your help.
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