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

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

Thanks ! is something like could work ?

if { (string tolower [HTTP::uri] starts_with “/alfresco”) and not ([string tolower [HTTP::uri]] starts_with “/alfresco/webdav”) }

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" 
    } 
  } 
}

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.

Is there a way to do the same using the HTTP Header of the request ?

you may try HTTP::header.

HTTP::header

Is there a way to detect the dav:// protocol ?

are these helpful?

sol13285: Support for WebDAV in a BIG-IP LTM HTTP profile (11.x)

Disabling HTTP Processing For Unrecognized HTTP Methods by Deb