Forum Discussion

Pankaj_70057's avatar
Pankaj_70057
Icon for Nimbostratus rankNimbostratus
Jan 26, 2012

To block some specific traffic from F5 for specific virtual directory

Here is the our requirement so if possible can you send me actual iRule to fulfill this requirement. Site: https://www.xyz.com/bac Allowed below host: 174.26.53.0/24 172.56.36.2 175.63.54.0/24 Block: all others Site: https://wwww.xyz.com Allowed for any So we require only filter for /bac virtual directory all other site running without any filter.

 

 

Thanks Pankaj

12 Replies

  • do you mean if you have 4 more paths like /bac to filter?

    if so, you can add them in switch case.

    e.g.

    when HTTP_REQUEST {    
       switch -glob [string tolower [HTTP::path]] {        
          "/bac*" {            
              do something
          }    
          "/111111*" {
              do something
          }    
          "/222222*" {
              do something
          }    
          "/333333*" {
              do something
          }    
          "/444444*" {
              do something
          }    
       }
    }
    
  • Correct. In the example you provided, I need to allow access to the last 4 paths from the private_nets datagroup only, and the other path would remain open to everyone. Thanks for your guidance and I'll begin the tweaking to make it work for me.