Redirecting ports (NAT) to another machine on a Cisco router
This article was first written in April 2004 for the BeezNest technical website (http://glasnost.beeznest.org/articles/121)
Log into the machine (using telnet for example).
Change to enable mode.
Change to configuration terminal mode:
# conf term
Issue the following command to redirect port 22/tcp from the outside interface (address) to the inside machine you would like the connection to get to:
(config)# ip nat inside source static tcp 192.168.0.7 22 220.127.116.11 22
First IP is the inside local IP address (inside the LAN, only reachable locally, so internal IP addressing) then the inside port on which to connect followed by the IP address of the outside global IP address then the port on which you want to reach that device.
Press <<ctrl-Z>> to exit the configuration terminal mode.
Issue the following command to apply and save the configuration on the flash (disk):
# write running