Forum Discussion
Vishal_96707
Nimbostratus
Feb 19, 2008Selective HTTPS redirection
I am having following requirement in which the servers in the pool should talk to the virtual server using HTTP only while all other users should redirect to HTTPS.
The requirement for servers talking to the VS was fulfilled using the following iRule
when CLIENT_ACCEPTED {
checks to see if client_addr = any in the class
fmw_nodes class has servers in the pool
if { [matchclass [IP::client_addr] equals $::fmw_nodes]} {
snat 192.168.253.250
} else {
pool fwm-uat.bmc.com
}
}
The HTTP -> HTTPS redirection is configured using following iRule
when HTTP_REQUEST {
HTTP::redirect https://[HTTP::host][HTTP::uri]
}
How does the iRule evaluation takes place when you have more than one iRules?
I would appreciate any help in this regards. I am new to Big IP LTM
Thanks in advance
- Nicolas_Menant
Employee
Hi, - Vishal_96707
Nimbostratus
If you see the code i have used for SNAT it sends the traffic pool if the client ip doesnt match using the matchclass. If that is the case and assume i have 2 rules 1. SNAT 2. HTTP_Request, will it go to the second rule? Is it necessary to use "else" after "if" - Nicolas_Menant
Employee
Hi, - Vishal_96707
Nimbostratus
when HTTP_REQUEST { - Nicolas_Menant
Employee
if you don't use any pool command, it will use the default pool configured in the VS - Vishal_96707
Nimbostratus
What is recommended method for SNAT? using SNAT configuration option via web or iRule? - Nicolas_Menant
Employee
if you need to apply SNAT to only specific client the best method is to use an iRule. Same thing if you need to use different SNAT configuration depending on the clients - Vishal_96707
Nimbostratus
Thanks for all your help. I will try and let you know. - Nicolas_Menant
Employee
Can you post your iRule ? - Vishal_96707
Nimbostratus
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