• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 c: Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
2 SPDX-License-Identifier: curl
3 Long: ftp-port
4 Arg: <address>
5 Help: Use PORT instead of PASV
6 Short: P
7 Protocols: FTP
8 See-also: ftp-pasv disable-eprt
9 Category: ftp
10 Example: -P - ftp:/example.com
11 Example: -P eth0 ftp:/example.com
12 Example: -P 192.168.0.2 ftp:/example.com
13 Added: 4.0
14 Multi: single
15 ---
16 Reverses the default initiator/listener roles when connecting with FTP. This
17 option makes curl use active mode. curl then tells the server to connect back
18 to the client's specified address and port, while passive mode asks the server
19 to setup an IP address and port for it to connect to. <address> should be one
20 of:
21 .RS
22 .IP interface
23 e.g. "eth0" to specify which interface's IP address you want to use (Unix only)
24 .IP "IP address"
25 e.g. "192.168.10.1" to specify the exact IP address
26 .IP "host name"
27 e.g. "my.host.domain" to specify the machine
28 .IP "-"
29 make curl pick the same IP address that is already used for the control
30 connection
31 .RE
32 .IP
33 
34 Disable the use of PORT with --ftp-pasv. Disable the attempt to use the EPRT
35 command instead of PORT by using --disable-eprt. EPRT is really PORT++.
36 
37 You can also append ":[start]-[end]\&" to the right of the address, to tell
38 curl what TCP port range to use. That means you specify a port range, from a
39 lower to a higher number. A single number works as well, but do note that it
40 increases the risk of failure since the port may not be available.
41 (Added in 7.19.5)
42