Wednesday, August 12, 2015

cisco - IOS Nated port forwarding



I have cisco ios router with ios C1900 Software (C1900-UNIVERSALK9-M), Version 15.2(4)M1. And I have setup Nat with port overload (one public IP). And there is a static mapping:



ip nat source static tcp 192.168.1.42 7780 interface GigabitEthernet0/0 80


Which works fine if I try to access web server from other isp's. (GE0/0 - ext interface, GE0/1 - internal interface) So when traffic goes from GE0/0 to GE0/1.




But when I want to access it from internal network (GE0/1) packet does not go to destination host. NVI nat table entry is created for this connection but packet's are not reaching 192.168.1.42:7780. So is this possible that nat outside address will work as port forward for inside nat pool ?



EDIT: Src ip is from local subnet i.e. 192.168.1.100 but I'm accessing wan addres i.e. 88.88.88.88 that is assigned to GE0/0 external WAN interface, so traffic goes through router.


Answer



The key was to add:



no ip redirects



on nat interfaces. It worked.


No comments:

Post a Comment

linux - How to SSH to ec2 instance in VPC private subnet via NAT server

I have created a VPC in aws with a public subnet and a private subnet. The private subnet does not have direct access to external network. S...