cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
451
Views
0
Helpful
6
Replies

NAT destination based on match between source and destination IP

iotea
Level 1
Level 1

I am searching for days now, but I can't figure out what to do.
This is what I try to achieve:

 

PC1 sends packet from IP 10.155.0.26 with destination 100.100.100.100

Router1 receives packet, confirms it is from ip 10.155.0.26 with destination 100.100.100.100 and changes destination to 192.168.114.14

But only when source IP 10.155.0.26 and destination 100.100.100.100 are in this combination.
Is this possible with a router? 

I did it once on an Asa while using ASDM, then it looks like this:

Screenshot 2023-02-10 at 14.00.25.png

** In the image source and destination are "provider", in my case now source is Inside and Destintion is Outside

6 Replies 6

Hello


@iotea wrote:

Router1 receives packet, confirms it is from ip 10.155.0.26 with destination 100.100.100.100 and changes destination to 192.168.114.14

But only when source IP 10.155.0.26 and destination 100.100.100.100 are in this combination.
Is this possible with a router? 



Yes it is possible, Can you confirm what rtr your are using?
Do you have to it CLI?

Example:
Interface x/x
description LAN port
ip nat inside

Interface x/x
description WAN port
ip nat outside

conf t

ip nat inside source static 10.155.0.25 100.100.100.100 

 


Please rate and mark as an accepted solution if you have found any of the information provided useful.
This then could assist others on these forums to find a valuable answer and broadens the community’s global network.

Kind Regards
Paul

Hello Paul,

 

Thank you for your answer, I use an vIOS router.
With the example given, it translates the source nat 10.155.0.25 to 100.100.100.100 right?

Hello

Yes it will


Please rate and mark as an accepted solution if you have found any of the information provided useful.
This then could assist others on these forums to find a valuable answer and broadens the community’s global network.

Kind Regards
Paul

balaji.bandi
Hall of Fame
Hall of Fame

adding to other post check below couple of examples and explanation :

https://www.practicalnetworking.net/stand-alone/cisco-asa-nat/

BB

***** Rate All Helpful Responses *****

How to Ask The Cisco Community for Help

Thank you for your answer, but that is how to configure it on Asa. I already did that, I am looking for how to do this on a router.

So you looking redirection

Router1 receives packet, confirms it is from ip 10.155.0.26 with destination 100.100.100.100 and changes destination to 192.168.114.14

PC1 10.155.0.26 destination 100.100.100.100

you want to redirect to next host 192.168.114.14  or change the source address 10.155 0.26 to 192.168.114.14 ?

BB

***** Rate All Helpful Responses *****

How to Ask The Cisco Community for Help

Review Cisco Networking for a $25 gift card