Forum Discussion
SNAT based on source and destination
Greetings,
I am working on Forwarding (IP) VS.
I have used the next:
when CLIENT_ACCEPTED {
if { [class match [IP::client_addr] equals VPN-SUBNET] } {
if {[class match [IP::remote_addr] equals APP1]} {
snat 10.13.0.25
}
}
else {
forward
}
}
And also this one:
when CLIENT_ACCEPTED {
if { [class match [IP::client_addr] equals VPN-SUBNET] and [class match [IP::remote_addr] equals APP1]} {
snat 10.13.0.25
}
else {
forward
}
}
Both of them do not work, there is no error while building the policy, just the traffic does not get snated to 10.13.0.25.
This one works, but snat all the traffic to 10.13.0.25, and I need only for a specific destination:
when CLIENT_ACCEPTED {
if { [class match [IP::client_addr] equals VPN-SUBNET] } {
snat 10.13.0.25
}
else {
forward
}
}
Could you advise how SNAT from an specific source and destination ?
Thanks,
Edouard.
I have tried below irule, added in the irule list and it worked correctly :
when HTTP_REQUEST { if {[string tolower [HTTP::uri]] starts_with "/test_check.do?test_id="} { HTTP::redirect "https://xyz.com/testing[HTTP::uri]" } }
Thanks you all for your responses.