Forum Discussion
IPs filtering
Hello (still newbie)
I have a rule that limits the access to /alfresco to a range of IP addresses. The access is limited to servers and IY users.
The pb is that I need to authorize the access to a particular URL = dav://MYHOST/alfresco/webdav/* for all end-users. Is there a way the except the requests to dav: ?
when HTTP_REQUEST { if { ([HTTP::uri] starts_with "/alfresco") } { Check if the client IP is not part of the datagroup hosts/networks if { not ([matchclass [IP::client_addr] equals allowed_clients_alfresco]) }{ Log dropped requests log local0. "Invalid client IP: [IP::client_addr] - discarding" drop the request discard HTTP::redirect "/erreur/403.php" } } }
Thanks Guillaume
5 Replies
- nitass
Employee
Is there a way the except the requests to dav: ?
you can check uri. when it matches, exit from the event using return command.
return
https://devcentral.f5.com/wiki/iRules.return.ashx - VOLA_144433
Nimbostratus
Thanks ! is something like could work ?
if { (string tolower [HTTP::uri] starts_with "/alfresco") and not ([string tolower [HTTP::uri]] starts_with "/alfresco/webdav") }
- nitass
Employee
this is just one of examples.
when HTTP_REQUEST { if { [HTTP::uri] starts_with "/alfresco/webdav" } { return } if { ([HTTP::uri] starts_with "/alfresco") } { Check if the client IP is not part of the datagroup hosts/networks if { not ([matchclass [IP::client_addr] equals allowed_clients_alfresco]) } { Log dropped requests log local0. "Invalid client IP: [IP::client_addr] - discarding" drop the request discard HTTP::redirect "/erreur/403.php" } } } - VOLA_144433
Nimbostratus
Thanks. Is there a way to do the same using the HTTP Header of the request ?
Is there a way to detect the dav:// protocol ?
G.
- nitass
Employee
Is there a way to do the same using the HTTP Header of the request ?
you may try HTTP::header.
HTTP::header
https://devcentral.f5.com/wiki/iRules.HTTP__header.ashxIs there a way to detect the dav:// protocol ?
are these helpful?
sol13285: Support for WebDAV in a BIG-IP LTM HTTP profile (11.x)
https://support.f5.com/kb/en-us/solutions/public/13000/200/sol13285Disabling HTTP Processing For Unrecognized HTTP Methods by Deb
https://devcentral.f5.com/wiki/iRules.DisablingHTTPProcessingForUnrecognizedHTTPMethods.ashx
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
* 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