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.0Colin_Walker_12
Historic F5 Account
Joined May 12, 2005
Colin_Walker_12
Historic F5 Account
Joined May 12, 2005
No CommentsBe the first to comment
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)