cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
3212
Views
5
Helpful
2
Replies

Configure NAT with specific destination IP address

ratha chum
Level 1
Level 1

Capture.PNG

with diagram:

I want Host A NAT to IP 111.1.1.2 when host A access to 2.2.2.2 and don't need NAT when Host A access to other IP.

NOTE: on router doesn't have other NAT rule.

1 Accepted Solution

Accepted Solutions

Hello,

 

try the below configuration:

 

interface GigabitEthernet0/0
description Uplink to ISP
ip address 111.1.1.1 255.255.255.0
ip nat outside
!
interface GigabitEthernet0/1
description LAN Interface
ip address 192.168.1.1 255.255.255.0
ip nat inside
!
ip nat inside source static 192.168.1.10 111.1.1.2 route-map HOST_NAT
ip route 0.0.0.0 0.0.0.0 111.1.1.254
!
route-map HOST_NAT permit 10
match ip address 101
!
access-list 101 permit ip host 192.168.1.10 host 2.2.2.2

View solution in original post

2 Replies 2

Hello,

 

try the below configuration:

 

interface GigabitEthernet0/0
description Uplink to ISP
ip address 111.1.1.1 255.255.255.0
ip nat outside
!
interface GigabitEthernet0/1
description LAN Interface
ip address 192.168.1.1 255.255.255.0
ip nat inside
!
ip nat inside source static 192.168.1.10 111.1.1.2 route-map HOST_NAT
ip route 0.0.0.0 0.0.0.0 111.1.1.254
!
route-map HOST_NAT permit 10
match ip address 101
!
access-list 101 permit ip host 192.168.1.10 host 2.2.2.2

Hello

The nat statement @Georg Pauwen has provided shuld accomodate your request -  However you say


@ratha chum wrote:

with diagram:

I want Host A NAT to IP 111.1.1.2 when host A access to 2.2.2.2 and don't need NAT when Host A access to other IP.


Can you confirm  192.168.1.0/24 subnet is then reachable externally, if this is the case then this specific internal host will also be.

 

 


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
Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community:

Innovations in Cisco Full Stack Observability - A new webinar from Cisco