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.
Write an article for LinuxForums Today! Win Great Prizes!
Find the answer to your Linux question:
New to Linux Forums? Register here for free!
    Linux Forums > GNU Linux Zone > Linux Networking > Tunnel/Forward FTP connection

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

Site Navigation
Linux Articles
Linux Forums
Linux Downloads
Linux Hosting
Free Magazines
Job Board
IRC Chat
RSS Feeds
Linux Forum Topics
Linux Forums
Your Distro
Linux Resources
GNU Linux Zone
The Community
Reply
 
Thread Tools Display Modes
Old 06-13-2008   #1 (permalink)
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)
Just Joined!
 
Join Date: Jul 2007
Posts: 49
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)
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)
Just Joined!
 
Join Date: Jul 2007
Posts: 49
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)
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

Free Magazines
A Newbie's Getting Started Guide to Linux
Learn the basics of the Linux operating systems. Get to know what it is all about, and familiarize yourself with the practical side. Basically, if you're a complete Linux newbie and looking for a quick and easy guide to get you started this is it.
subscribe
Run Your Own Web Server Using Linux & Apache - Free 191 Page Preview
Learn about everything you'll need to build and maintain your Linux servers, and to deploy Web applications to them.
subscribe
Open Source Security Myths Dispelled
Dispel the five major myths surrounding Open Source Security and gain the tools necessary to make a truly informed decision for your IT organization
subscribe
InformationWeek
InformationWeek is the only newsweekly you'll need to stay on top of the latest developments in information technology.
subscribe



All times are GMT. The time now is 07:18 PM.






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

Content Relevant URLs by vBSEO 3.3.1