I use python ftplib to connect to a ftp server which is running on active mode; That means the server will connect my client machine on a random port when data is sent between us.
Considering security issue, Can I specify the client's data port (or port range) and let the server connect the certain port? 
Many Thanks for your response.
Since Python 3.3, ftplib functions that establish connections take a source_addr argument that allows you to do exactly this.
How can I specify the client's data port for a ftp server in active mode?