LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices

Reply
 
Search this Thread
Old 05-03-2007, 03:19 AM   #1
guarriman
Member
 
Registered: Nov 2004
Posts: 101

Rep: Reputation: 15
SSH tunnelling to connect FTP server through a router: ports to enroute?


Hi.

I'm trying to make an SSH tunnelling to connect an FTP server at '254.60.X.X' (a public server) through '192.168.2.103' (a private Linux machine within my LAN).

Behind my LAN I've got a router with this two ports enrouted:
80--->192.168.2.103:80
22--->192.168.2.103:22

The steps I make:
[]# ssh -l remoteuser -L 2121:254.60.X.X:21 192.168.2.103 cat -
[]# lftp -u john,xxxx -p 2121 localhost

It works with lftp (since a 2121 server is created on my local machine), but it doesn't work with a graphical client (I use gFTP). I open gFTP, I connect localhost:2121, but it hangs. In addition, my router hangs too.

Does anybody have any experience? Which ports must I enroute?

Thank you very much
 
Old 05-04-2007, 12:51 PM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,373

Rep: Reputation: 1962Reputation: 1962Reputation: 1962Reputation: 1962Reputation: 1962Reputation: 1962Reputation: 1962Reputation: 1962Reputation: 1962Reputation: 1962Reputation: 1962
ftp is a nightmare of a protocol for things like this, as it picks ports dynamically on the server side and tells the client what port to connect to. the best solution i'd say is to not use ftp at all, and use sftp instead, which is a doddle using a single port and all. alternatively, you'd need (AFAIK) a *passive* connection to be established, so the end you control picks the port to use not the normal way. you'd then also need to forward that port. this doc looks pretty useful... http://www.castaglia.org/proftpd/doc...HOWTO-SSH.html but the easiest way still would be to not use ftp itself.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[putty&ssh] Who is really good & expert in ssh https tunnelling and firewalling ? Xeratul Linux - General 12 12-03-2006 03:22 AM
FTP and SSH server ports IBall Linux - Networking 1 12-01-2005 04:29 AM
Tunnelling yahoo messenger through SSH pnellesen Linux - Networking 1 09-17-2005 06:37 PM
configuring it as a router ftp, my sql,web server, and open and close ports with masq digitalf Mandriva 1 09-04-2004 04:43 AM
tightvnc using ssh tunnelling curmudgeon42 Linux - Software 1 08-18-2004 09:40 PM


All times are GMT -5. The time now is 03:20 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration