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 tal...
Vishal_96707
Nimbostratus
Mar 04, 2008I did some modification and somehow looks like it worked. I am waiting for few more confirmations from the apps team.
when HTTP_REQUEST
{
log local0. "Client IP is: [IP::client_addr]"
if {[matchclass [IP::remote_addr] equals $::fmw_nodes]}
{
log local0. "SNAT activated ..."
snat 192.168.253.250
}
else
{
log local0. "Redirecting ..."
HTTP::redirect https://[HTTP::host][HTTP::uri]
}
}
In the logging i have used the client_addr while in the "if" statement i used remote_addr. It somehow captured all the info.
Mar 4 08:08:56 tmm tmm[1089]: Rule fmw-test3 : Client IP is: 172.18.202.195
Mar 4 08:08:56 tmm tmm[1089]: Rule fmw-test3 : Redirecting ...
Mar 4 08:08:56 tmm tmm[1089]: Rule fmw-test3 : Client IP is: 172.18.202.195
Mar 4 08:08:56 tmm tmm[1089]: Rule fmw-test3 : Redirecting ...
Mar 4 08:09:02 tmm tmm[1089]: Rule fmw-test3 : Client IP is: 192.168.253.110
Mar 4 08:09:02 tmm tmm[1089]: Rule fmw-test3 : SNAT activated ...
Mar 4 08:09:03 tmm tmm[1089]: Rule fmw-test3 : Client IP is: 192.168.253.110
Mar 4 08:09:03 tmm tmm[1089]: Rule fmw-test3 : SNAT activated ...
is client_addr and remote_addr same? Just trying to understand....
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)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