05-30-2017 06:13 AM
We have couple of vyatta deployments in different locations.
All of them are able to connect between each other.
I want to make something like proxy on one of the vyattas to do:
Some source IP (ex. 10.10.10.10) connect to the vyatta's ip address on port (192.168.100.1:2222).
once this source tries to connect, vytta should change the destination and source IP like. 192.168.100.1 and destination ip of 126.96.36.199 for example.
On this way the original destionation of 188.8.131.52 will believe that the source is 192.168.100.1 and will reply to it.
Once reply is recieved on the vyattas 192.168.100.1 address it should reply back to the original source of 10.10.10.10.
Is there a way to achive that ?
You may find a brief diagram as attachment
05-30-2017 09:31 AM
The configuration for that should be :
set service nat destination rule 1 destination address 192.168.100.100 set service nat destination rule 1 inbound-interface <if1_name> set service nat destination rule 1 translation address 184.108.40.206 set service nat source rule 1 source address 10.10.10.10 set service nat source rule 1 outbound-interface <if2_name> set service nat source rule 1 translation address 220.127.116.11
where if1 and if2 are the interfaces with addresses 192.168.100.100 and 18.104.22.168, respectively.
You can also use
set service nat source rule 1 translation address masquerade
for the last line
Note that vRouter must have routes for 10.10.10.10 and 22.214.171.124.
The above configuration is for 5600. If you're using a 5400, just use "set nat ..." instead of "set service nat ...".