Forum Discussion
Irule Help
i think you had better also check uri.
e.g.
when HTTP_REQUEST {
if { ![IP::addr [IP::client_addr] equals 10.1.2.0/24] and [HTTP::uri] eq "/" } {
HTTP::redirect "http://[HTTP::host]/cams"
}
}
- ssam_138429Jan 03, 2018
Nimbostratus
No luck. I have tried enabling logging and found the irule is not detecting the ip address.
when HTTP_REQUEST {log local0. "before ip" if { ![IP::addr [IP::client_addr] equals 10.1.2.0/24] and [HTTP::uri] eq "/" } { log local0. "after ip" HTTP::redirect "http://[HTTP::host]/cams" } }
- ssam_138429Jan 03, 2018
Nimbostratus
I am getting only the "before ip" in the logs. Seems like the if condition is not matching.
- ssam_138429Jan 06, 2018
Nimbostratus
Any luck or suggestions ?
- nitass_89166Jan 06, 2018
Noctilucent
have you added logging Lee (MrPlastic) suggested? can you post the log?
- ssam_138429Jan 10, 2018
Nimbostratus
yes I have tried that but no luck
- Morten_MarstranJan 10, 2018
Nimbostratus
I tested this in my lab now, and it works fine. My BIG-IP is running version 12.1.2 (Build 1.0.271).
Can you start a tcpdump and verify that the source IP (client side) actually is what you expect it to be?
Regards, Morten
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