Forum Discussion
Torsten_Heß_937
May 03, 2005Nimbostratus
Matchclass HTTP::HOST
Hello,
I have problem concerning the following rule. I tried to migrate a 4.x rule to a 9.5 rule an it failed. The rule is accepted but didn´t work.
The 4.x rule looks like:
if (http_host == one of test-DE-Domain) {
use pool Test-pool
else {
log "Attack: " + client_addr + " -> " + http_host + http_uri
discard
}
}
The 9.x should look like:
i defined a class
class test-DE-Domain {
"www.test"
"www.test1"
}
a pool
pool Test-Pool {
monitor all tcp
member 10.10.10.1:80
member 10.10.10.2:80
}
and the rule
when HTTP_REQUEST {
if { [matchclass [HTTP::host] equals $::test-DE-Domain] } {
use pool Test-Pool
log "[HTTP::uri]"
} else {
log local "Failed"
}
}
What´s wrong with the rule
Thanks!
2 Replies
Sort By
- First of all, without further information as to how things are actually behaving and failing, I can't be certain of the cause of the problem.
when HTTP_REQUEST { if { [matchclass [HTTP::host] contains $:: test-DE-Domain] } { pool Test-Pool log "[HTTP::uri]" } else { log "Failed" } }
- hi,
class test_de_domain { "www.test1" "www.test2" } when HTTP_REQUEST { if {[matchclass [HTTP::host] starts_with $::test_de_domain]}{ pool test_pool_http log local0. "[HTTP::host] Forwarded" } else { pool drop_pool_http log local0. "[HTTP::host] Failed" } }
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