Forum Discussion
Bastien_8356
Jun 07, 2011Nimbostratus
iRule to block user coming from 1 URL
Hi there,
I'd like to block any http request to any user coming from a particular website.
It's going on a web server that is behind the F5 and already have a public IP address. I...
hooleylist
Jun 07, 2011Cirrostratus
Hi Bastien,
That looks right if you wanted to drop all requests coming into the virtual server with a Referer header of http://blahblah/. Can you test this on a test virtual server and add logging to see what was happening?
when HTTP_REQUEST {
if { ([HTTP::header "Referer"] eq "http://blahblah/") } {
log local0. "[IP::client_addr]:[TCP::client_port]: Dropping [HTTP::method] to [HTTP::host][HTTP::uri] with Referer [HTTP::header Referer]"
drop
} else {
log local0. "[IP::client_addr]:[TCP::client_port]: Allowing [HTTP::method] to [HTTP::host][HTTP::uri] with Referer [HTTP::header Referer]"
}
}
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