-1

I need to upload a file in SUSE Linux Enterprise 12 to a FTP server that only allows implicit FTPS (actual upload needs to be triggered from PHP but I can run arbitrary shell commands). The firewall restricts outgoing connections by default. I already submitted a ticket and got port 990 open but FTP requires two connections.

Is there a way to restrict or control the range of outbound ports so I can submit a request for only a few ports?

Additional details:

  • The FTP server seems to be configured to use a wide range of random ports (I've been getting ports from 1683 to 33277).

  • Curl doesn't seem to even have an option to say "please allocate a port between a and b". Perhaps that means it isn't possible.

  • I'm already considering the idea of filing a request for a given host rather than port (I guess that should be possible) but if I could choose the port range I might be able to re-use ports that I know to be already open.

Álvaro González
  • 142,137
  • 41
  • 261
  • 360

1 Answers1

0

In passive FTP mode, the client has no control over the port, which the server choose to use for the data connection.

Martin Prikryl
  • 188,800
  • 56
  • 490
  • 992
  • 1
    I wonder why this answer got a downvote. If someone knew that the information is incorrect it'd be trivial to show a counter-example. – Álvaro González Nov 07 '19 at 17:50