For security issues we need to change the vsftpd server tcp port # 21 to alternate port.
We need edit the configuration file for vsftpd server for the same. The default configuration file is /etc/vsftp/vsftpd.conf
# vi /etc/vsftp/vsftpd.conf
Change the line
connect_from_port_20=YES
To
connect_from_port_20=NO
Ater that append the following and line and restart the vsftpd server.
ftp_data_port=9020
listen_port=9021
listen_port=9021
#server vsftpd restart
That’s it.