LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
Search this Thread
Old 04-02-2009, 04:46 AM   #1
dr.mabuse
LQ Newbie
 
Registered: Apr 2009
Posts: 4

Rep: Reputation: 0
ftp to sftp bridge ( bitvise tunnelier like).


Hi all!

I would like to to a ftp to sftp bridge connection like I can do it using bitvise tunnelier. My idea is when some client connects to my server via ftp (intranet) I would establish immediately a sftp connection to another server (outside intranet) sending files securely and automatically from my client to the other server outside the intranet, even the files are sent insecurely from my client to my server.

I have tried ssh port forwarding without success. Any idea?
 
Old 04-04-2009, 07:25 PM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 27,457
Blog Entries: 54

Rep: Reputation: 2897Reputation: 2897Reputation: 2897Reputation: 2897Reputation: 2897Reputation: 2897Reputation: 2897Reputation: 2897Reputation: 2897Reputation: 2897Reputation: 2897
Quote:
Originally Posted by dr.mabuse View Post
I have tried ssh port forwarding without success.
Since you have not explained (actual commands, FTP transfer test results, error output) the "without success" part it is impossible to comment on this. SSH can provide you with a permanent tunnel from one system to another but it won't get you a SSL-ized connection in the sense of FTPS. (That is, SSL-ized FTP, like IMAPS is SSL-ized IMAP and HTTPS is SSL-ized HTTP.) The only GNU/Linux tool I know that should be able to "translate" between protocols is Delegate. If you OTOH actually meant SFTP (as in SSH subsystem) then the answer simply is "no". SFTP and FTP are not compatible in any way I know of.
 
Old 04-05-2009, 03:39 AM   #3
dr.mabuse
LQ Newbie
 
Registered: Apr 2009
Posts: 4

Original Poster
Rep: Reputation: 0
sFTP instead of FTPs

You are right. My idea is to do a FTP to SFTP bridge so if someone is sending me something using FTP I connect to SFTP to another server (outside my intranet) and send It again using SFTP.

One possibility would be to implement a script that maps all files from the ftp folder and resend it using sftp. My problem in this case is that the client has no feedback about the correctness of the connection, i.e, if the sftp connection fails, the ftp client won't know it.

My Aim is to have a FTP to SFTP bridge like bitvise tunnelier.
 
Old 04-05-2009, 10:31 AM   #4
camh
Member
 
Registered: Feb 2005
Distribution: Slack/Debian
Posts: 163
Blog Entries: 2

Rep: Reputation: 33
I don't think what you want is directly possible. Even a product like the Bitvise Tunnelier wouldn't do this. All that program appears to do is initiate an SSH tunnel to a preconfigured host and install a local service that can interpret FTP commands and translate them into SFTP commands.

Since you want to connect to a third system, this setup wouldn't work. The client would only ever be connecting to your system, not the third party one.

A script option would probably be the best bet. The client would know that the file was successfully sent to your system. However, from there it would be up to you to ensure that the file was successfully sent to the third party. But you could add email notifications, automatic retries, etc. to your script; basically whatever kind of due diligence you want.

The only other option I can think of would be to give the client direct access to the third party, however, I'm assuming you don't want to go that route.
 
Old 04-06-2009, 02:23 AM   #5
dr.mabuse
LQ Newbie
 
Registered: Apr 2009
Posts: 4

Original Poster
Rep: Reputation: 0
Thanks camh, I think I will go further with script option.
 
Old 04-06-2009, 03:42 AM   #6
TimothyEBaldwin
Member
 
Registered: Mar 2009
Posts: 249

Rep: Reputation: 27
Sshfs and an FTP server may do the job.
 
Old 04-06-2009, 05:03 AM   #7
unSpawn
Moderator
 
Registered: May 2001
Posts: 27,457
Blog Entries: 54

Rep: Reputation: 2897Reputation: 2897Reputation: 2897Reputation: 2897Reputation: 2897Reputation: 2897Reputation: 2897Reputation: 2897Reputation: 2897Reputation: 2897Reputation: 2897
Quote:
Originally Posted by TimothyEBaldwin View Post
Sshfs and an FTP server may do the job.
Sounds like an good solution!
 
Old 04-07-2009, 02:52 AM   #8
dr.mabuse
LQ Newbie
 
Registered: Apr 2009
Posts: 4

Original Poster
Rep: Reputation: 0
Thanks for all!
This looks like a great solution. However, Is there any script that controls the sftp connections?
My aim is to implement a script like below:

0. Some user using ftp connects to my ftp server.
1. Prior allowing the transfer. Mount the sshfs unit.
2. If there is no connection then forbids the transfer. (sending back a transfer error).
3. Else copy the file to the unit and disconnect.

My problem here is that I don't know how to control the ftp server connections. If there is no easy solution I will further with sshfs avoiding feedback connection information.
 
Old 04-07-2009, 03:52 AM   #9
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,414

Rep: Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966
not a networking question. moved to Linux - Newbie.
 
Old 04-07-2009, 11:30 AM   #10
TimothyEBaldwin
Member
 
Registered: Mar 2009
Posts: 249

Rep: Reputation: 27
Quote:
Originally Posted by dr.mabuse View Post
0. Some user using ftp connects to my ftp server.
1. Prior allowing the transfer. Mount the sshfs unit.
2. If there is no connection then forbids the transfer. (sending back a transfer error).
3. Else copy the file to the unit and disconnect.
If you wish to mount sshfs automatically (rather than having it permanently mounted) use Autofs.

However if you wish to use the username and/or password provided by the ftp client to connect to the ssh server I suspect some programming will be required.
 
Old 04-29-2012, 07:55 PM   #11
leifboo
LQ Newbie
 
Registered: Apr 2012
Posts: 1

Rep: Reputation: Disabled
Why no Tunnelier for Linux? Why?

Last edited by leifboo; 04-29-2012 at 08:09 PM.
 
Old 04-30-2012, 01:45 AM   #12
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,414

Rep: Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966
Please don't drag up dead threads. As to why - ask Bitvise, it's none of our business.
 
  


Reply

Tags
bridge


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
how to create sftp user only in red hat 4 not ftp user ..only sftp user princeu28 Linux - Newbie 1 10-14-2008 08:10 AM
FTP and SFTP christopher_c Linux - Newbie 2 08-20-2008 11:07 PM
how to turn off ftp/sftp? Tarps87 Linux - Newbie 5 09-27-2007 11:51 PM
Confused: FTP, SSH, SFTP msymms Linux - Networking 13 06-12-2007 12:35 PM
Using SFTP instead of FTP cliffyman Linux - Software 0 01-19-2003 10:41 AM


All times are GMT -5. The time now is 06:27 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