Change vsftpd ftp server port 21
Q. Because of security issues I would like to change vsftpd port 21. How do I configure vsftpd to use other ports instead of default TCP port 21.
A. vsftpd, which stands for Very Secure FTP Daemon, is an FTP server under Ubuntu, Fedora Core, Red Hat Enterprise Linux and a number of other distributions.
Changing default port is good idea.
All you need to do is edit the configuration file for vsftpd server. The default configuration file is /etc/vsftp/vsftpd.conf or /etc/vsftpd.conf.
First login as root user
Open vsftpd.conf file
# vi vsftpd.conf
Find line that read as follows
listen_port=21
Replace port 21 with new port such as 201
listen_port=201
Save and close the file. 201 is port number you can set it to whatever port you want. Please make sure no other service use 201 port.
Now restart vsftpd
# /etc/init.d/vsftpd restart
Client need to use port 21 while connecting to ftp server:
$ ftp ftp.myserver.com 201
Subscribe to our free e-mail newsletter or RSS feed to get all updates.
You can Email this page to a friend.
Related Other Helpful FAQs:
- How to Change the vsftp or vsftpd server banner message
- CentOS / Red Hat Linux Install VSFTPD FTP Server
- VSFTPD limit the number of simultaneous vsftpd connections for a single IP address
- FTP Connection refused error - Solution to problem
- Ubuntu Linux vsftpd ftp service / server install, configuration howto
Discussion on This FAQ
Leave a Reply
We encourage your comments, and suggestions. But please stay on topic, be polite, and avoid spam. Thank you very much for stopping by our site!


January 10th, 2007 at 12:30 pm
After changing the default port number not able to use ftp service from outside network. From Lan it is working fine
January 10th, 2007 at 1:52 pm
Dhiraj
Make sure new port is open at firewall.