Juha_47876
Oct 14, 2011Nimbostratus
SNAT based on destination IP
Hi,
I would need a solution for the following requirement.
I have a pool of servers and their internal IP addresses are e.g.:
pool POOL_WITH_6NODES {
lb method member least conn
action on svcdown reset
monitor all tcp
members
192.168.1.1:1234
192.168.1.2:1234
192.168.1.3:1234
192.168.1.4:1234
192.168.1.5:1234
192.168.1.6:1234
}
Then I have 3 VIPs that all use the same pool of servers e.g.:
virtual VS_NODES_1 {
pool POOL_WITH_6NODES
destination 172.1.1.1:1234
ip protocol tcp
}
virtual VS_NODES_2 {
pool POOL_WITH_6NODES
destination 172.1.1.2:1234
ip protocol tcp
}
virtual VS_NODES_3 {
pool POOL_WITH_6NODES
destination 172.1.1.3:1234
ip protocol tcp
}
What I need is that when any one of my 6 servers will connect to external host e.g. host1=10.1.1.1 then the internal IP will be SNATted to 172.1.2.100
host2=10.2.2.2 then the internal IP will be SNATted to 172.1.2.101
host3=10.3.3.3 then the internal IP will be SNATted to 172.1.2.102
How can I do this?