Forum Discussion
BMeyering_10972
Nimbostratus
Aug 14, 2012irule to block file types from extenal client IP
Hi,We are attempting to create a irule to block external users from downloading sharepoint files.
Extenal user are connecting via external F5 v11.1 running APM/LTM. Access policy connects...
BMeyering_10972
Nimbostratus
Aug 28, 2012here is the test url as it appears from APM webtop...
https://devportal.abccompany.com/f5-w-68747470733a2f2f646576696e74646f63732e636d73656e657267792e636f6d$$/Shared%20Documents/DocsSites.xlsx
here is the current iRule
when HTTP_REQUEST {
log local0. "IP [IP::client_addr] Host [HTTP::host] uri [HTTP::uri] HTTP-path [HTTP::path] header-content [HTTP::header value Content-Type]"
if { [IP::addr [IP::client_addr] equals x.x.x.166] and [string tolower [HTTP::host]] starts_with "devintdocs" } {
[URI::decode [string tolower [HTTP::path]]] ends_with {
".xls" -
".xlsx" -
".doc" -
".docx" -
".ppt" -
".pptx" }{
HTTP::respond 200 content {
Apology Page
We are sorry, but the document you are attempting to access is restricted by Corporate Policy.
If you feel you have reached this page in error, please contact your supervisor.
}
}
} else {
log local0. "devint pool select"
switch [HTTP::host] {
"devintportal" { pool sharepoint_devint_Pool }
"devintmy" { pool sharepoint_devint_Pool }
"devintdocs" { pool sharepoint_devint_Pool }
"devintteams" { pool sharepoint_devint_Pool }
"partners" { pool sharepoint_devint_Pool }
}
}
}
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