Forum Discussion
Vince_Beltz_959
Nimbostratus
Oct 22, 2009Drop 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 messa...
hoolio
Cirrostratus
Oct 22, 2009Can you try this instead with added logging?
when HTTP_REQUEST {
log local0. "[IP::client_addr]:[TCP::client_port]: New [HTTP::method] request to [HTTP::host][HTTP::uri] with UA [HTTP::header User-Agent]"
switch -glob [string tolower [HTTP::header "User-Agent"]] {
"*torrent*" -
"*azureus*" -
"*windows-media-player*" -
"*microsoft-webdav-miniredir*" {
log local0. "[IP::client_addr]:[TCP::client_port]: Matched UA check. Closing TCP connection."
TCP::close
}
default {
log local0. "[IP::client_addr]:[TCP::client_port]: UA didn't check, redirecting."
HTTP::redirect http://targetsite.tld
}
}
}
If TCP::close doesn't work, can you try reject instead? This should trigger LTM to send a RST packet to the client.
Can you post anonymized copies of the logs from both TCP::close and reject?
Thanks,
Aaron
Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects
