I´am going to setup a working configuration on a cisco router using some nat concepts. The main goal is to nat incoming connections from different outside addresses to a single inside address, but furthermore translate the destination port based on the outside source address. Please notice the following examples for a clearer understanding of the required scenario.
184.108.40.206 -> 220.127.116.11:25 translate to 10.10.10.1:2500
18.104.22.168 -> 22.214.171.124:25 translate to 10.10.10.1:2501
126.96.36.199 -> 188.8.131.52:25 translate to 10.10.10.1:2502
I tried out different approaches, but was not able to find a working configuration. I found one posting which covers a similar nat scenario, but this translates to different inside addresses based on the source address. So this is not exactly what I´m looking for. https://supportforums.cisco.com/message/152963#152963
There are another two approaches in my mind to achieve this goal, but I´m not sure if it´s possible to configure this on IOS.
Maybe it is possible to use a NAT destination list, like descriped in the thead I´ve linked on the top, to translate to different loopback addresses. After this translation a further static translation should occur. Again, please look at the following example.
1 step: 184.108.40.206 -> 220.127.116.11:25 translate to 192.168.0.1:25 (loopback address)
2 step: 192.168.0.1:25 translate to 10.10.10.1:2500
1 step: 18.104.22.168 -> 22.214.171.124:25 translate to 192.168.0.2:25 (loopback address)
2 step: 192.168.0.2:25 translate to 10.10.10.1:2501
Another solution I could imagine would be to put connections from different sources into seperate VRF´s. So in every single VRF I could define static inside nat commands to specific ports. As I´m completely new to VRF´s, I don´t know if this is possible.
I would be very glad about any suggestions for this issue.