Forum Discussion

Vince_Beltz_959's avatar
Vince_Beltz_959
Icon for Nimbostratus rankNimbostratus
Oct 22, 2009

Drop Doesn't

I've implemented the following iRule to filter out certain user agents from connecting to our servers. Testing with Firefox and the Modify Headers add-on, it seems to work - I get a disconnected message instead of a page when I add one of the filtered strings to my User-Agent field.

 

 

However, the guys running the servers have been testing with packet capture, and claim they're still seeing the connection attempts come through. The whole point of this is that we're trying to prevent these connections from hitting the servers at all. Is the drop/event disable/return not the best way to do this?

 

 

when HTTP_REQUEST {

 

switch -glob [string tolower [HTTP::header "User-Agent"]] {

 

"*torrent*" -

 

"*azureus*" -

 

"*windows-media-player*" -

 

"*microsoft-webdav-miniredir*" {

 

drop

 

event disable

 

return }

 

}

 

HTTP::redirect http://targetsite.tld

 

}