Forum Discussion

Steven_Keller_8's avatar
Steven_Keller_8
Icon for Nimbostratus rankNimbostratus
Dec 02, 2005

Using match_regex

We am trying to restrict incoming users from certain directories. We are running version 4.5.10. We have the following irule:

 

 

if (http_uri matches_regex "cbi-bin/XYV/.*/LISEXT/1FRAME/[cgilnstV].*" or http_uri matches_regex "cbi-bin/XYV/.*/LISCANADA/1FRAME/[a-zA-Z].*" or http_uri matches_regex "cbi-bin/XYV/.*/LISINSPECT/1FRAME/[a-zA-Z].*" or http_uri matches_regex "icons/.*" or http_uri matches_regex "graphics/lis./.*jpg" or http_uri matches_regex "graphics/specchars/[a-z]*\.jpg" or http_uri matches_regex "g[^/.]*\.pdf" or http_uri matches_regex "localids/.*\.pdf" or http_uri matches_regex "imgs/.*\.jpg") {

 

log local0.debug "URI:" + http_uri

 

log local0.debug "HOST:" + http_host

 

log local0.debug "Discarded URI:" + http_uri

 

use pool database.ul.com

 

}

 

else {

 

discard

 

}

 

 

We have put the log statements in the irule to determine where it is failing and we see nothing in "/var/log/bigip" when we try connecting. If anyone can let me know what we are doing wrong, please let me know.

 

 

Thanks

 

Steve