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.

Simple DDOS Protection for HTTP Requests

Problem this snippet solves:

Here is a straight-forward example of how you can avoid a location specific DDOS attack via iRules. This iRule inspects the Accept-Language header to get an idea of the source of the attack, and filters based on that.

Code :

when HTTP_REQUEST {
  if { [HTTP::uri] equals "/" }{
    #log "uri: [HTTP::uri] "
    HTTP::redirect "http://anotherserverpool"
  } elseif { [HTTP::uri] equals "/homepage.asp" } {
    #log "uri: [HTTP::uri] "
    HTTP::redirect "http://anotherserverpool"
  } elseif {[string tolower [HTTP::header "Accept-Language"]] contains "ru"} {
    HTTP::redirect "http://nullsite"
  } else {
    pool mypool
  }
}
Published Mar 18, 2015
Version 1.0
No CommentsBe the first to comment