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