samir_110997
Nov 10, 2007Nimbostratus
PLEASE HELP SNAT conditionnel and traffic redirection
hi everybody,
as i'm not familiar with i-rules, i really need you help to correcte my i'rule cause the site is at risk.
I have created a strandard virtual serveur for the http traffic (80) and an i'rule so as to redirect all the traffic http to the second Internet provider ISP2, but there is only one exeption for three servers where the trafic http for theses servers should be directed to the first Internet Provider ISP1 and must be natted differently.
thes is my irule:
when LB_SELECTED {
if { [IP::addr [IP::client_addr] equals 172.24.95.139 ] } {
snat 196.29.40.139
pool Pool_Routeur_ISP1
} elseif { [IP::addr [IP::client_addr] equals 172.24.95.133 ] } {
snat 196.29.40.133
pool Pool_Routeur_ISP1
} elseif { [IP::addr [IP::client_addr] equals 172.24.95.135 ] } {
snat 196.29.40.135
pool Pool_Routeur_ISP1
} elseif { [TCP::local_port] == 80 } {
pool Pool_Routeur_ISP2
} elseif { [TCP::local_port] == 443 } {
pool Pool_Routeur_ISP2
} else {
snat automap
}
}
thanks for all in advance