Forum Discussion
Bob_10976
Nimbostratus
May 05, 2010Rejecting Blank Host
Hello all, we have created an iRule that is suppose to block request to a website with no Host Header. I've included the code below. The rule appears to be working, but we are getting the following error in the BigIP log files:
TCL error: BlockNoHeader - expected integer but got "reject" while executing "HTTP::respond reject"
The iRule consist of this:
when HTTP_REQUEST {
if { [HTTP::host] equals "" } {
HTTP::respond reject }
}
Any thoughts or suggestions, maybe we could be doing the block method better?
Thanks,
Bob
- hoolio
Cirrostratus
Hi Bob, - Bob_10976
Nimbostratus
Thanks for the quick reply Aaron.. Just to clarify the rule would look like this: - hoolio
Cirrostratus
Exactly. Did that work as you want? - Bob_10976
Nimbostratus
At first I thought that did the trick because I didn't see anything in this mornings logs. I checked yesterdays logs and I can see: local/tmm err tmm[4820]: 01220001:3: TCL error: Test_BlockNoHeader - expected integer but got "reject" while executing "HTTP::respond reject" - hoolio
Cirrostratus
Hi Bob,when HTTP_REQUEST { if { [HTTP::host] equals "" } { reject } }
- Bob_10976
Nimbostratus
Yes, I get the same error when I use the excat code above. Does it matter that I'm running 10.0.1 on my LTMs, would the iRule require a different syntax or something?
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