Backup to FTPserver with other port

Mathieu

Verified User
Joined
Sep 23, 2004
Messages
15
Hello

I want to make backups to a local Ftp server here on my computer.
But my provider blocks the ftp port.

I want to make backups to that FTP server on a other port.
How can i make this setting in DirectAdmin plz?

Thanks!
 
I have a fileserver as well running on a different port, will it be possible to run the FTP backup to another port than 21?
 
You can't change the script to do it but you can make a firewall entry to change destination port 21 to some other port.

Google is your friend, because I have no idea how :D .

Jeff
 
jlasman said:
You can't change the script to do it but you can make a firewall entry to change destination port 21 to some other port.

Google is your friend, because I have no idea how :D .

Jeff
Yes, but that defeats purpose because the whole point of running a fileserver with an FTP login at a different port is for safety measures. If I'm opening up port 21 to route it to the correct port I could just as well run the daemon on port 21.

This is silly, every ftp client has the capability of connecting to another port than 21, so somewhere in the code port 21 is hardcoded, it would be tremendously easy (imho) to softcode it and add another variable for it. If nothing is entered the default value would be 21 and be done with it.

I don't know if I should post this in the feature request forum?
 
Outgoing port does not equal incoming port.

If you create a firewall rule to take traffic destined to port 21 and route it to another port, you're not changing anything to do with your system behind your ISPs firewall, and you're not changing any incoming port 21 traffic on your system.

And you'll have to leave port 21 open on your DA server anyway, so your clients can upload their sites.

So I don't know what you mean.

Jeff
 
jlasman said:
Outgoing port does not equal incoming port.

If you create a firewall rule to take traffic destined to port 21 and route it to another port, you're not changing anything to do with your system behind your ISPs firewall, and you're not changing any incoming port 21 traffic on your system.

And you'll have to leave port 21 open on your DA server anyway, so your clients can upload their sites.

So I don't know what you mean.

Jeff
And in turn I'm not getting what you mean.

I have 2 servers, one webhosting server that is running a normal FTP daemon on port 21 and another server that is running it's services on other ports for security measures. It blocks out most of the direct hacking attempts. On that server I wish to deliver the backups via FTP, but that means I have to connect on a different port than 21.

So DA (21) --> Backup (7021 fi)

Now if I were to change the porting rules on the DA server I would still not be able to deliver backups to the backup server as DA is still trying to connect on a (closed) port 21.
 
What I thought I meant :) was that you need a rule in the firewall on the DA box so that email going out TO port 21 is redirected to (for example) 7021.

I know it's doable; I have no idea of the details or any other issues involved.

Since you need it, you can do the homework :) .

Jeff
 
jlasman said:
What I thought I meant :) was that you need a rule in the firewall on the DA box so that email going out TO port 21 is redirected to (for example) 7021.

I know it's doable; I have no idea of the details or any other issues involved.

Since you need it, you can do the homework :) .

Jeff
It's not e-mail, it's a normal FTP connection as the other server is running a normal ftp daemon.

I'm sure that by rerouting all outgoing traffic on port 21 to another port (f.i. 7021) I manage to get onto the backup server. Problem then would be that it's a default setting for all port 21 connections and that I'm unable to wget something from an ftp site running at 21.

I'll put it in the feature request form tomorrow since I'm sure adding just 1 variable "Port" would be the easiest and most logical way to go.
 
Backup to non standard FTP port

I agree that a port opition in DA would be great but until that happens here is my solution.

This may differ on your system. It has been tested to work perfectly on a Cent OS 4.4 final with DA 1.28 and SysBK 1.0.

ssh to your server
login as root
type this replacing X with your port number
perl -pi -e 's/NCFTP_PUT/NCFTP_PUT -P X/' /usr/local/sysbk/internals/internals.sysbk

If your internals.sysbk file is not found in that location then you need to use the correct path on your system.
 
Back
Top