Forum Discussion

Parveez_70209's avatar
Parveez_70209
Icon for Nimbostratus rankNimbostratus
Nov 01, 2013

How to modify this Irule with HTTP_REQUEST replacing CLIENT_ACCEPTED

Kindly guide:

  1. To delete the CLIENT_ACCEPTED part and replace the same with HTTP_REQUEST and
  2. Also to remove the IP SEGMENT PART: 172.27.64.0/22
  3. Query: Incase, I keep CLIENT_ACCEPT and use 0.0.0.0/32, will it be use for every segment ?
  4. And in same Irule, wanted to make use of default { HTTP::redirect https://[HTTP::host][HTTP::uri] }

when CLIENT_ACCEPTED {

if { [IP::addr [IP::clientexample_addr] equals 172.27.64.0/22] } {
    snat automap
}

switch [TCP::localexample_port] {
    "5000"  {
        pool example_ems
    }
    "5005"  {
        pool example_ems
    }
    "5100"  {
        pool example_webvis
    }
    "5105"  {
        pool example_webvis
    }
    "5110"  {
        pool example_recall
    }
    "5115"  {
        pool example_recall
    }
    "5200"  {   
        pool example_recon
    }
    "5205"  {   
        pool example_recon
    }
    "5400"  {   
        pool example_hub
    }
    "5405"  {   
        pool example_hub
    }

    default {
        log local0.alert "[virtual name] [TCP::localexample_port] - No port match - TCP Reject"
        reject
    }
}

}