Forum Discussion
Brian_Gupta_115
Nimbostratus
Nov 04, 2005Debugging a rule...
For some reason, my browser is having to request a certain URL 5 times before the BigIP sends the request... (please note this only happens the first time the browser requests the document.)
-Brian
Nov 4 15:30:31 tmm tmm[14602]: 01220002:6: Rule psoft_parse : /psreports/PSUNX/14063/CBL_PTPDBTST_1160103.log
Nov 4 15:30:47 tmm tmm[14602]: 01220002:6: Rule psoft_parse : /psreports/PSUNX/14063/CBL_PTPDBTST_1160103.log
Nov 4 15:31:03 tmm tmm[14602]: 01220002:6: Rule psoft_parse : /psreports/PSUNX/14063/CBL_PTPDBTST_1160103.log
Nov 4 15:31:19 tmm tmm[14602]: 01220002:6: Rule psoft_parse : /psreports/PSUNX/14063/CBL_PTPDBTST_1160103.log
Nov 4 15:31:34 tmm tmm[14602]: 01220002:6: Rule psoft_parse : /psreports/PSUNX/14063/CBL_PTPDBTST_1160103.log
Nov 4 15:31:34 tmm tmm[14602]: 01220002:6: Rule psoft_parse : /psreports/psunx/14063/cbl_ptpdbtst_1160103.log
Nov 4 15:31:34 tmm tmm[14602]: 01220002:6: Rule psoft_parse : /psreports/psunx/14063/cbl_ptpdbtst_1160103.log
Nov 4 15:31:35 tmm tmm[14602]: 01220002:6: Rule psoft_parse : /psreports/PSUNX/14063/CBL_PTPDBTST_1160103.log
Here is the rule:
when HTTP_REQUEST {
set my_uri [string tolower [HTTP::uri]]
set usessl 0
if { $my_uri starts_with "/servlets/iclientservlet/hr" } {
redirect to "/hr"
} elseif { $my_uri starts_with "/servlets/iclientservlet/selfservice" } {
redirect to "/selfservice"
} elseif { $my_uri == "/hr" } {
redirect to "/HR/signon.html"
} elseif { $my_uri == "/selfservice" } {
redirect to "/SELFSERVICE/signon.html"
} elseif { $my_uri == "/payroll" } {
redirect to "/PAYROLL/signon.html"
} elseif { $my_uri == "/finti" } {
redirect to "/FINTI/signon.html"
} elseif { $my_uri == "/finspc" } {
redirect to "/FINSPC/signon.html"
} elseif { $my_uri contains "/finti/?cmd=login" } {
redirect to "/psp/PAEP/?cmd=login"
} elseif { $my_uri contains "/finspc/?cmd=login" } {
redirect to "/psp/PAEP/?cmd=login"
} elseif { $my_uri contains "/crmp/?cmd=login" } {
redirect to "/psp/PAEP/?cmd=login"
} elseif { $my_uri == "/paep" } {
redirect to "/PAEP/signon.html"
} elseif { $my_uri == "/crmp" } {
redirect to "/CRMP/signon.html"
} elseif { [matchclass $my_uri contains $::ps_portal_uris] } {
pool ps_pa_ssl
snat none
set usessl 1
} elseif { [matchclass $my_uri contains $::ps_rpt_hrms_uris] } {
pool ps_rpt_hrms_ssl
set usessl 1
} elseif { [matchclass $my_uri contains $::ps_rpt_fin_uris] } {
pool ps_rpt_fin_ssl
log [HTTP::uri]
set usessl 1
} elseif { [matchclass $my_uri contains $::ps_rpt_crm_uris] } {
pool ps_rpt_crm
} elseif { [matchclass $my_uri contains $::ps_hrms_uris] } {
pool ps_hrms_ssl_prod
set usessl 1
} elseif { [matchclass $my_uri contains $::ps_fin_uris] } {
pool ps_fin_ssl_prod
set usessl 1
} elseif { [matchclass $my_uri contains $::ps_crm_uris] } {
pool ps_crm_ssl
snat none
set usessl 1
} elseif { [matchclass $my_uri contains $::ps_gwib_uris] } {
pool ps_hrms_ssl_prod
snat none
set usessl 1
} elseif { [matchclass $my_uri contains $::ps_gwam_uris] } {
pool ps_fin_ssl_prod
snat none
set usessl 1
} else {
reject
}
}
when SERVER_CONNECTED {
if { $usessl == 0 } {
SSL::disable
}
}
when HTTP_REQUEST_SEND {
if { [matchclass $my_uri contains $::ps_rpt_fin_uris] } {
log $my_uri
}
}
when HTTP_RESPONSE {
if { [matchclass $my_uri contains $::ps_rpt_fin_uris] } {
log $my_uri
}
}
- Brian_Gupta_115
Nimbostratus
I added log statements for LB_SELECTED and SERVER_CONNECTED. Note: It is taking about 30 seconds for the BigIP to connect to the server.when HTTP_REQUEST { set my_uri [string tolower [HTTP::uri]] set usessl 0 if { $my_uri starts_with "/servlets/iclientservlet/hr" } { redirect to "/hr" } elseif { $my_uri starts_with "/servlets/iclientservlet/selfservice" } { redirect to "/selfservice" } elseif { $my_uri == "/hr" } { redirect to "/HR/signon.html" } elseif { $my_uri == "/selfservice" } { redirect to "/SELFSERVICE/signon.html" } elseif { $my_uri == "/payroll" } { redirect to "/PAYROLL/signon.html" } elseif { $my_uri == "/finti" } { redirect to "/FINTI/signon.html" } elseif { $my_uri == "/finspc" } { redirect to "/FINSPC/signon.html" } elseif { $my_uri contains "/finti/?cmd=login" } { redirect to "/psp/PAEP/?cmd=login" } elseif { $my_uri contains "/finspc/?cmd=login" } { redirect to "/psp/PAEP/?cmd=login" } elseif { $my_uri contains "/crmp/?cmd=login" } { redirect to "/psp/PAEP/?cmd=login" } elseif { $my_uri == "/paep" } { redirect to "/PAEP/signon.html" } elseif { $my_uri == "/crmp" } { redirect to "/CRMP/signon.html" } elseif { [matchclass $my_uri contains $::ps_portal_uris] } { pool ps_pa_ssl snat none set usessl 1 } elseif { [matchclass $my_uri contains $::ps_rpt_hrms_uris] } { pool ps_rpt_hrms_ssl set usessl 1 } elseif { [matchclass $my_uri contains $::ps_rpt_fin_uris] } { pool ps_rpt_fin_ssl log [HTTP::uri] set usessl 1 } elseif { [matchclass $my_uri contains $::ps_rpt_crm_uris] } { pool ps_rpt_crm } elseif { [matchclass $my_uri contains $::ps_hrms_uris] } { pool ps_hrms_ssl_prod set usessl 1 } elseif { [matchclass $my_uri contains $::ps_fin_uris] } { pool ps_fin_ssl_prod set usessl 1 } elseif { [matchclass $my_uri contains $::ps_crm_uris] } { pool ps_crm_ssl snat none set usessl 1 } elseif { [matchclass $my_uri contains $::ps_gwib_uris] } { pool ps_hrms_ssl_prod snat none set usessl 1 } elseif { [matchclass $my_uri contains $::ps_gwam_uris] } { pool ps_fin_ssl_prod snat none set usessl 1 } else { reject } } when SERVER_CONNECTED { if { $usessl == 0 } { SSL::disable } if { [matchclass $my_uri contains $::ps_rpt_fin_uris] } { log $my_uri } } when HTTP_REQUEST_SEND { if { [matchclass $my_uri contains $::ps_rpt_fin_uris] } { log $my_uri } } when HTTP_RESPONSE { if { [matchclass $my_uri contains $::ps_rpt_fin_uris] } { log $my_uri } } when HTTP_RESPONSE_CONTINUE { if { [matchclass $my_uri contains $::ps_rpt_fin_uris] } { log $my_uri } } when LB_SELECTED { if { [matchclass $my_uri contains $::ps_rpt_fin_uris] } { log $my_uri } }
- Colin_Walker_12Historic F5 Accountbrandorr,
... redirect to "/hr" ... } elseif { $my_uri == "/hr" } { redirect to "/HR/signon.html" ...
- Brian_Gupta_115
Nimbostratus
After seeing the TCPDUMP, it looks like for some reason SNAT is not functioning for that particular matchclass... - Colin_Walker_12Historic F5 AccountThat doesn't make much sense. Why would that stop it from responding the first few times, and not the last one?
- Brian_Gupta_115
Nimbostratus
The last one is sent with the BigIP SNAT address. Ok here's a clue... The packets that are going through without SNAT are SYN packetsw. Oddly, I'm not seeing a SYN packet coming in from the client on the EXTernal VLAN. I am however seeing it on the INTernal VLAN. (Without the SNAT).
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