Setting up vsftpd in passive mode

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

connect_from_port_20=YES

pasv_enable=YES

pasv_addr_resolve=YES

pasv_address=myaddress.dyndns.com

pasv_min_port=4242

pasv_max_port=4252

 

Reference:

http://flukylogs.blogspot.sg/2012/01/vsftpd-behind-routerfirewall.html

Advertisements

One thought on “Setting up vsftpd in passive mode

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s