Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Setting up a port redirect on Cisco 1602 Router 1

Status
Not open for further replies.

hltool

MIS
Nov 29, 2001
3
US
Greetings, everyone..!

I'm new to Cisco configuration, but a friend has asked for my help setting up a simple FTP port redirect for his 1602 router. He would like to redirect all incoming FTP request to a Win2000 machine on the other side of his router.

Router WAN IP (for this example): 10.10.1.1
Router LAN IP: 192.168.0.1
Internal Win2000 Machine IP: 192.168.0.2
(Running FTP Server on port 21)

What is the best way to solve this problem? It seems like just one command-line entry using IOS commands should be enough, but I'm currently on page 49 of the 224-page IOS command reference. Do I need to focus on the MAC address instead of IP's? Possibly using the mac-address-table static command?

Please take into account my newness in Cisco router configuration. I naively assumed I could ferret out the necessary commands using my trusted Google searches, but have come up empty...

Thanks in advance for any help! ;]

 
Not sure what IOS the 1600s run, but the 600s have this command to redirect ports:

set nat entry add 192.168.0.2 21 10.10.1.1 21 tcp
set nat entry add 192.168.0.2 22 10.10.1.1 22 tcp

If your router runs the set commands, then that should work. Make sure you redirect both ports 21 and 22 or ftp will not work. ~~~~~~~~~~~~~~
shnypr-small.gif

tech@shnypr.com
~~~~~~~~~~~~~~
 
Thanks Shnypr! I really didn't think of ESTABLISHING incoming NAT mapping. For whatever reason, when I thought of NAT it was just for outgoing sessions. I'll try this out on Saturday and let you know how it worked. ;]

btw, the port 21 entry seems very logical, but why exactly is the port 22 entry necessary? That port is usually reserved for Linux SSH sessions. Snipping a few lines from my /etc/services gives me this:

ftp 21/tcp
ftp 21/udp
ssh 22/tcp # SSH Remote Login Protocol
ssh 22/udp # SSH Remote Login Protocol
telnet 23/tcp
telnet 23/udp

Regardless, I will try out these commands and test thoroughly.

Thanks again!
 
I am sorry, it is port 20, not 22. So you need to NAT port 20 and 21 for FTP.

You are correct, 22 is for SSH. ~~~~~~~~~~~~~~
shnypr-small.gif

tech@shnypr.com
~~~~~~~~~~~~~~
 
No need to apologize! You have steered me in the right direction, and I appreciate the help. I can't wait to test this out tomorrow... :}
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top