Technical Forum
Ask questions. Discover Answers.
cancel
Showing results for 
Search instead for 
Did you mean: 

Block Irule

suguruGeto
Nimbostratus
Nimbostratus

Hi Guys,

 

i have written an irule in order to block some specific user agents 

when HTTP_REQUEST {
if {[class match [string tolower [HTTP::header "User-Agent"]] contains Blocked_Users]}{
log local0. "Request from ip: [IP::client_addr] - User-Agent: [HTTP::header User-Agent] to: [HTTP::host] [HTTP::uri]"
drop
}
}

and i  get logs like this:

TCL error: /Common/<http_request> - Can't call after responding - ERR_NOT_SUPPORTED (line 1) invoked from within "HTTP::header "User-Agent""</http_request></131>

 

I would like to know what does this mean more precisily , if the traffic is passing anyway even if its part of the blocked DG, does irule has any error or something .

 

Many thnx,

Daniel

3 REPLIES 3

Hi Daniel,

Is there any other iRule binded on the virtual server?

TCL error: ERR_NOT_SUPPORTED after upgrade to version 14.1.0 or later
https://my.f5.com/manage/s/article/K23237429

 

when HTTP_REQUEST {
	if { [HTTP::has_responded] } { return }
	if { [class match [string tolower [HTTP::header "User-Agent"]] contains Blocked_Users] } {
		log local0. "Request from ip: [IP::client_addr] - User-Agent: [HTTP::header User-Agent] to: [HTTP::host] [HTTP::uri]"
		drop
		return
	}
}

 

 

Hello,

Are you assinging another irules on the same virtual server? Also, can you share how did you create the data group?

There is a post mentioning the a similar error which is:

"Can't call after responding - ERR_NOT_SUPPORTED (line 1) invoked from within"

https://community.f5.com/t5/technical-forum/irules-can-t-call-after-responding-err-not-supported-lin...

Thanks,

LiefZimmerman
Community Manager
Community Manager

@suguruGeto  - If your post was solved it would be helpful to the community to select *Accept As Solution*.
Thanks for being part of our community.