Having a packet capture for uploading with passive mode is worth our time,
so let's generate one.
Uploading files using FTP passive mode is pretty easy too.
Let's review the lftp script.
This is very similar to the FTP active mode upload script,
except explicitly enables FTP passive mode.
The put command is used to send R3.cfg to the FTP server,
and when we finish up with the ls command,
we should see R3.cfg in the directory listing on the remote server.
Let's run the script and examine the results.
The initial feature and login chatter hasn't changed,
but as a quick reminder,
the server needs to tell the client it supports passive mode using the PASV
feature in order for the PASV command to function properly.
The client sends the PASV command to the server,
which triggers a dynamic port allocation and signals this back to the client.
In this example, TCP port 32068 is used.
The transfer is quickly completed without issue.
Now, the list command on the server returns the directory contents,
including R3.cfg, the newly uploaded file.
Again, I'd suggest exploring other FTP minor features,
such as changing file permissions, deleting files, and managing directories, on your own.