cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
557
Views
0
Helpful
3
Replies

NAT Configuration - Filter on Source Address

ayaz.akhtar
Level 1
Level 1

Is it possible to configure NAT such that traffic from a particular subnet will pass through the NAT process, while traffic from other subnets will 'bypass' the NAT process?

For example, Router A is on the public address range, but to get to the private networks has Router B as its next hop. Both have an interface on the same subnet

Router B has one interface on the public network and the other on the private network.

We want to configure NAT on Router A so that traffic from its local subnet does not pass through the NAT process. But, traffic orginating from the private networks via Router B will pass through the NAT process on Router A.

We would appreciate sample configs.

Thanks in advance.

3 Replies 3

donewald
Level 6
Level 6

What is NAT'd and what is not is configured via ACL's, so you should be able to get the function you desire. I will send a few URLS on NAT that should help you on your way.

http://www.cisco.com/warp/customer/556/12.html

http://www.cisco.com/warp/customer/556/nat-cisco.shtml

http://www.cisco.com/warp/customer/556/9.html

Hope this helps,

Don

ayaz.akhtar
Level 1
Level 1

But, NAT only uses access-lists when it needs to create a translation entry. If a translation entry already exists that matches the traffic then the translation entry will be used; any access-list will not be consulted.

Basically, I have a PC on the inside network, which uses public addressing, and therefore does not need to be translated when passing thorough the NAT router.

The NAT router uses both static and dynamic NAT - I have several 'ip nat outside source static' mappings.

Checking the NAT table on the router while trying HTTP from the PC shows that the source address of the PC does not get translated, because it is not permitted by the ACL, but the destination address is translated due to the 'ip nat outside source static' command. I do not want the router to change the destination address for traffic from/to this PC.

Is there any way that the router could look at both the source and destination address at the inside interface, before deciding whether traffic should be NATed or not before it is sent out of the outside interface?

for your internal interface, bind a secondary ip (which should also be a public ip in the same range as the pc with the public ip)

for eg.

interface ethernet 0

ip address 10.10.10.1 255.255.255.0

ip address 172.5.5.2 255.255.0.0 secondary

however, this might affect your other natting, so please check other settings...

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: