Redirecting ports (NAT) to another machine on a Cisco router

This article was first written in April 2004 for
the BeezNest technical website (

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 22 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

Related Posts

HOWTO Activate NAT on Debian

This article is incomplete and was first written in September 2006 for the...

Activating the DHCP server in a Cisco router

This article was first written in July 2005 for the BeezNest technical website...