For more information regarding the security incident at F5, the actions we are taking to address it, and our ongoing efforts to protect our customers, click here.

Forum Discussion

fhoban_128910's avatar
fhoban_128910
Icon for Nimbostratus rankNimbostratus
Mar 12, 2014

iRule help for beginner

hi,

 

Have a very easy question.I am looking for an i rule to do the following. FW Public IP > LB listneing on Port 80 > Real Server Pool listening on Port 90xx Service is advertised as follows to internet ... http://x.x.x.x/NameofService. I only want to advertise this exact URL/service and all other requests to get an error page back from F5 ( eg Service Unavailable ) Currently I have only one server deployed behind this VIP , probably will be more but not at the moment.

 

Thanks in advance

 

1 Reply

  • Assuming there's a single DNS entry that resolves to the virtual server IP, and you only really care about the URI, something like this might work:

    when HTTP_REQUEST {
        if { not ( [string tolower [HTTP::uri]] equals "/nameofservice" ) } {
            HTTP::respond 200 content "Service Unavailable"
        }
    }