Forum Discussion
Irule for Uri and Client IP address.
Hi,
First of all, thanks for you swift response. Third line in the irule, if it is not match with the related datagroup must be dropped. So that, this line must be written like this, please correct me if i am wrong ;
if { $httpUri starts_with "/eqwebservice" && $clientIp not equals "" }
There is also one thing you should care about it, if the Uri is different from /eqwebservice must be forward to the pool without a problem. For example ;
www.test.com/abc ( this uri must be forward to the pool )
Can your irule do this ?
Best Regards,
- ekaleidoSep 19, 2016
Cirrus
Yessir.
- Seckin_149390Sep 20, 2016
Nimbostratus
Hi Thanks,
I wrote a irule like this and it seems that ok now ;
when HTTP_REQUEST { set HttpUri [HTTP::uri] set ClientIp [class match -value [IP::client_addr] equals allowed_ip_addresses] if { ([HTTP::uri] starts_with "/eqwebservice") && (![class match [IP::client_addr] equals allowed_ip_addresses]) } { log local0. "Invalid client IP : [IP::client_addr] ==> TCP connection will be dropped...!!!" drop
} else { log local0. "Valid client IP or http uri: [IP::client_addr] ==> forwarding traffic..." pool web1_pool } }
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
* 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