chris_16019
Dec 01, 2008Nimbostratus
iRule & SNAT
Hi - I was hoping someone may be able to offer some assistance or point me at a URL that will help with some configuration work that is required.
Background - I have a backend server that has multiple IP addresses for SSL certificate purposes. I have added a new virtual server address that points to the backend server, however I am unable to add a SNAT for outgoing traffic to be hidden behind this virtual server address as the real address of the server already exists in the address pool of a different virtual server SNAT.
A pool is no good as I need a different SNAT for different website communications from the same server. So I'm thinking I need to use an iRule to change the SNAT based on a unique characteristic within the packet, something like the URL. However after a few hours searching the only previous examples I can find all relate to IP addresses. Is it a case of amending something like the below to have URL instead of IP address within the text, and if so is anyone able to offer some syntax assistance.
when CLIENT_ACCEPTED { if { [IP::addr [IP::local_addr] equals "A.A.A.A"] } {
use snat Z.Z.Z.Z
} elsif { [IP::addr [IP::local_addr] equals "B.B.B.B"] } {
use snat Y.Y.Y.Y
} else { use snat X.X.X.X
}
Many thanks.
Chris