Forum Discussion
gomebe_33353
Nimbostratus
May 11, 2016TCL error
TCL error: /Common/v3CSR-IP-CHECK - invalid IP network mask specification (line 9)invalid IP match item 63.x.x.x 64.x.x.x for IP class /Common/v2whitelist_client (line 9) invoked from within "class ...
Yann_Desmarest
Cirrus
May 11, 2016Hello,
When you have more than one IP address in the X-Forwarded-For header, your irule generate this tcl error.
You should replace
if { [class match [HTTP::header values "X-Forwarded-For"] equals v2whitelist_client] } {
log local0. "Allowed Request From: [IP::remote_addr]"
} else {
HTTP::redirect "http://www.domains/errors/error.html"
log local0. "Denied Request From: [IP::remote_addr]"
}
by :
foreach ipaddress [HTTP::header values "X-Forwarded-For"] {
if { [class match $ipaddress equals v2whitelist_client] } {
log local0. "Allowed Request From: [IP::remote_addr]"
} else {
HTTP::redirect "http://www.domains/errors/error.html"
log local0. "Denied Request From: [IP::remote_addr]"
}
}
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)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