Forum Discussion
Bob_10976
Nimbostratus
Apr 16, 2009iRule to Block request with Host Header
I'm needing some help with creating an iRule that will block any request that doesn't have a host header value.
For example if someone was to preform a GET / HTTP/1.1 on one our website...
The_Bhattman
Nimbostratus
Apr 16, 2009There are several ways to approach this
Here are some examples
when HTTP_REQUEST {
if { [HTTP::header "Host"] equals " " } {
reject
}
}
or
class publicaddr {
"215.25.25.35"
"215.25.25.33"
"215.25.25.34"
}
when CLIENT_ACCEPTED {
if { [matchclass [IP::remote_addr] equals $::publicaddr] } {
reject
}
}
These are just examples.
Hope this helps
CB
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