We currently have a web application in our environment that we wish to have a single pool of servers for, with separate TIP's for Internal and External users.
We want the users who hit the internal TIP to be directed to
app1.xyz.com/passthroughauthentication.htm
We want users that hit the external TIP to go to
app1.zyx.com/formsbasedauthentication.htm
I am unable to see a way to do a IF/Then with traffic script that uses the Traffic IP as the qualifier, any ideas?
Solved! Go to Solution.
See the request.getLocalIP() function, Returns the IP address that the client connected to, i.e. the address local to this machine.
if( request.getLocalIP() == "10.0.0.1" ){
http.redirect( "app1.xyz.com/passthroughauthentication.htm" );
}
else {
http.redirect( "app1.zyx.com/formsbasedauthentication.htm" );
}
Depends on how your client handles a HTTP redirect.
One way would to be bind each Traffic IP to its own Virtual Server, then use a trafficscript as appropriate on each VS ie, for the internal one:
http.redirect( "http://app1.xyz.com/passthroughauthentication.htm" );
If you don't like the idea of using two Virtual Servers you could look at string.ipmaskmatch - ie, check wether the source IP address is in a private address space. Only works if your 'internal' clients use private addresses.
There are other things you can do, such as have pools for specific nodes which only handle specific types of authentication and switch between the pools as required depending on the source - a bit more involved to set up though.
See the request.getLocalIP() function, Returns the IP address that the client connected to, i.e. the address local to this machine.
if( request.getLocalIP() == "10.0.0.1" ){
http.redirect( "app1.xyz.com/passthroughauthentication.htm" );
}
else {
http.redirect( "app1.zyx.com/formsbasedauthentication.htm" );
}