Forum Discussion
Brandon_nodnarb
Nimbostratus
Mar 02, 2005Need help with an irule to determine path
We have a requirement for our external customers to present a valid certificate. We have a rule for this, but we need a rule in front of this one that says anybody coming from our internal/trusted ip range gets passed straight to the pool and not to the rule that verifies certificates. Here is our current rule. Any help would be greatly appreciated.
Thanks,
Brandon
for testing purposes lets use 192.168.100.0/24 for our trusted ip range.
and pool "test_pool"
CURRENT IRULE
when CLIENTSSL_CLIENTCERT {
check the status of the Client cert
store the value in the session table
session add ssl [SSL::sessionid] [X509::verify_cert_error_string [SSL::verify_result]] 180
}
when HTTP_REQUEST {
set id [SSL::sessionid]
look up this session to find out what our Cert status is
if we see that the status is OK then we insert a header
set y [session lookup ssl $id]
if { $y contains "ok" } {
HTTP::header insert SSLCLientCertStatus $y
} else {
we get here because the status was not "ok"
HTTP::redirect http://yourcertisinvalid.com/nogood.htm
}
}
- Brandon_nodnarb
Nimbostratus
i've tried using varients of this rule, but keep getting token errors, and parse errors.... - I see a couple of problems with the code.
when CLIENTSSL_HANDSHAKE { if { [IP::addr [IP::local_addr] equals "10.10.10.10"] } { use pool my_pool } }
- Brandon_nodnarb
Nimbostratus
Thanks. I will give that a try. As a general rule I don't include irule my_irule in my irules. the example comes straight from F5. - drteeth_127330Historic F5 AccountOne more thing. If the SSLCLientCertStatus header is used for authorization, then you should be sure to remove it first in case a client is trying to trick you.
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