FTP: “Bad EPRT protocol” solved

Lost some time in this, so maybe it is useful to you: I kept getting “Bad EPRT protocol” errors trying to connect to some FTP servers with the macosx command-line client behind a NAT.

The solution is to disable the use of the EPSV / EPRT commands, using the epsv4 command. Or put it in .netrc to make it sticky.

...
230 Login successful.
Remote system type is UNIX.
Using binary mode to transfer files.
ftp> epsv4
EPSV/EPRT on IPv4 off.

These extensions are defined in RFC 2428.

3 Responses to FTP: “Bad EPRT protocol” solved

  1. Mary says:

    Thanks for posting this! I was getting this error, and worse yet, somehow an aborted FTP upload had hosed my web page (ack!) and I couldn’t FTP in to do anything about it. It was driving me nuts, so I was happy to find this and fix the problem and restore my page.

  2. Christopher says:

    Thanks for this, really came in handy…

  3. Christopher says:

    Thanks for saving me time to tweak this. I will drink a cognac to your health and success…

%d bloggers like this: