Welcome to Linux Forums!

With a comprehensive Linux Forum, information on various types of Linux software and many Linux Reviews articles, we have all the knowledge you need a click away, or accessible via our knowledgeable members.

Linux Forum ArticlesLinux ForumsLinux Forum DownloadsLinux Hosts
Home|Register|FAQ|Member List|Calendar|Unanswered Posts|Forum Rules|Today's Posts|Advanced Search|
SEARCH FOR IN
Go Back   Linux Forums > GNU Linux Zone > Linux Networking
Reload this Page Tunnel/Forward FTP connection
Linux Forums
Linux Forums
Welcome To The Linux Forums!
Welcome to Linux Forums. We pride ourselves in being one of the largest Linux communities on the web, we encourage you to REGISTER on our forums and participate in the community. There are over 150,000 members ready to answer your questions. JOINING US today will allow you to make new posts, get support, send messages to other members and submit downloads to our downloads directory and many other great features!

Linux Networking Hardware/Software related, Modems, Internet connection sharing, IPTables etc.

Reply
 
Thread Tools Display Modes
Old 06-13-2008   #1 (permalink)
kadu
Just Joined!
 
Join Date: Jun 2008
Posts: 3
Tunnel/Forward FTP connection

Hi all,

I have a dedicated server with 1and1 and they also provide me with some free FTP backup space on a separate server. I have a script running daily that compress the files I want to backup and uploads them to the FTP server.

So far so good, my problem is that I can only access this backup server from my dedicated server, I'm trying to make a tunnel (via ssh) to allow me to connect to the FTP server from my home network. I'm doing this so I can use a FTP software to access and delete some files from the backup server to free space for new files.

How can I do this?

Many Thanks
Kadu
kadu is offline   Reply With Quote
Old 06-15-2008   #2 (permalink)
kazler
Just Joined!
 
Join Date: Jul 2007
Posts: 29
To use ssh you would have to log into your server and use a ssh port forward using something like this
Code:
ssh -L21:localhost:21 username@backupserver
this will push anything sent on port 21 down the ssh tunnel to port 21 on the remote side.

For a more permanent solution if you have root access you can do this with iptables.
kazler is offline   Reply With Quote
Old 06-15-2008   #3 (permalink)
kadu
Just Joined!
 
Join Date: Jun 2008
Posts: 3
Thanks Kazier, but I'm afraid it doesn't work.

I think the problem is that the backup server does not accept ssh connection, so I get the following message:

ssh: connect to host backup90.pureserver.info port 22: Connection refused

is there any other way I can do it?

Thanks
Kadu
kadu is offline   Reply With Quote
Old 06-15-2008   #4 (permalink)
kazler
Just Joined!
 
Join Date: Jul 2007
Posts: 29
it does look like they either have it firewalled off from you or disallowed within ssh your servers IP, it maynot have ssh installed or even be a M$ box.

I think the only other way would be to use iptables to redirect port 21 from your server to the backup box. I can't really give you any advice on how you would do it as I have never used iptables

You could though use ftp from the linux shell on your server to delete files which is pretty straight forward to use. Other than that you could script it to auto remove old files via the cron and ftp from your server or trigger it manually.
kazler is offline   Reply With Quote
Old 06-15-2008   #5 (permalink)
kadu
Just Joined!
 
Join Date: Jun 2008
Posts: 3
That's what I thought.

I've done a router box with iptable a while back, I suppose I can find my way around it again.

I do use the shell from the server to delete the files, but it's a bit painful as the name of the backup files are long and I have to type them completely because ftp doesn't let me use the TAB key to complete the filename.

A script is possible the best option here, I just have to find some time and write one.

Many thanks
Kadu
kadu is offline   Reply With Quote
Old 07-09-2008   #6 (permalink)
tgv
Just Joined!
 
Join Date: Jul 2008
Posts: 1
help is coming

Just solved exactly the same problem with this soft -
Tunnelier (Bitvise)

You will need to enable Socks/Proxy forwarding at services tab and then use localhost:1080 in your ftp client as a socks5 proxy. that's it!
tgv is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

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 On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off




All times are GMT. The time now is 10:49 AM.




© 2000 - 2008 - All Rights Reserved - Property of  MAS Media

Content Relevant URLs by vBSEO 3.0.0