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.