If vsftpd server is behind a router, you are likely to get errors like “Server sent passive reply with unroutable address. Using server address instead.” or “500 illegal port command” on list (ls) command, this post might help. Setting passive mode configuration correctly is the trick.
Make sure port 20, 21 and few more ports, for example 4242-4252, are being forwarded to the server. We will need these extra ports for passive mode – set pasv_min_port andpasv_max_port accordingly in the configuration file. Add following to /etc/vsftpd.conf