Forum Discussion

COf5's avatar
COf5
Icon for Mist rankMist
Nov 27, 2024

iRule for public IP access to specific section of my URL

 

I will need someone to validate this iRule for me, pls

 

Request: allow only a public IP or Subnet access to a section of my URL : https://xxx.xxx.com/xxx/* )

 

Many recommendations welcome.

 

after adding the ALLOW_x.x.x.x on Data Group List

 

 

when HTTP_REQUEST {
  if {[HTTP::uri] eq "https://xxx.xxx.com/xxx/*"} {
    if {![class match [IP::client_addr] equals ALLOW_x.x.x.x]} {
      HTTP::respond 403 content "<html><body>Access not permitted</body></html>" Connection Close
      TCP::close
    }
  }
}

 

 

No RepliesBe the first to reply