Forum Discussion

    • jayson27's avatar
      jayson27
      Icon for Altocumulus rankAltocumulus

      Hi Aswin,

       

      Yes we will allow only specific IPs to access specific URL

  • Ozzy's avatar
    Ozzy
    Icon for Altocumulus rankAltocumulus

    hello ,

    yes it is possible.. here is the example.. 

    when HTTP_REQUEST {
        set srcip [IP::client_addr]
        if { [HTTP::header exists "X-Forwarded-For"] } {
            set srcip [HTTP::header "X-Forwarded-For"]
            #log local0. "USER-SOURCE $srcip"
        }
     
        if  { [HTTP::path] starts_with "/xzy" } {
            switch $srcip {
                "13.174.130.182" -
                "31.121.101.157" -
                "35.77.107.183" {
              ACCESS::disable
                }
            }
        }
    }

    • jayson27's avatar
      jayson27
      Icon for Altocumulus rankAltocumulus

      Hi,

      Can you tell me if below is correct?

       

      if  { [HTTP::path] starts_with "/xzy" } {        <<<<<<<<< URL
              switch $srcip {
                  "13.174.130.182" -             <<<<<<<<<<<<<<<<< IPs Allowed?
                  "31.121.101.157" -
                  "35.77.107.183" {
                ACCESS::disable                <<<<<<<<<<<<<<<<< Action?