Forum Discussion
nathe
Cirrocumulus
Aug 20, 2012Block Direct Access to website
Afternoon,
I could do with a bit of guidance please.
I have a front end webserver, load-balanced on LTM, and a link on this webserver to another external facing webserver, also loa...
hoolio
Cirrostratus
Aug 20, 2012The Referer header will start with a protocol like http:// or https://. You could try something like this to be more specific:
when HTTP_REQUEST {
switch -glob [string tolower [URI::host [HTTP::header "Referer"]]] {
"www.mywebsite.com"
"www.contentwebsite.com" {
Allow Request to go through...
}
"" {
HTTP::respond 200 content ""
log local0 "Blank Referer from IP: [IP::client_addr]"
}
default {
HTTP::redirect [HTTP::header "Referer"]
log local0 "Blocked Referer: [HTTP::header value Referer] from IP: [IP::client_addr]"
}
}
}
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