After you enter the username and password, you will get the successful login message. Connect to Remote FTP ServerĪs you can see from the previous screenshot when you try to login to the FTP server, by default, it suggests the local user that you can use to login. Where the above IP is the FTP server machine IP. From the client machine, connect to the FTP server. #Ftp server ubuntu installIn case the FTP client is not installed, you can install it using the command as follows: sudo apt-get install ftp To test the FTP server, you need to connect from another machine using the FTP client which is already installed on most of the Linux systems. sudo service vsftpd restart Test The FTP Server Now we need to restart the vsftpd service to enable all the previous changes. After editing the vsftpd configuration file, save and quit it. There are a lot of settings in the vsftpd configuration file you can check them and decide which is best for you. Local_umask=022 -> Give the correct permissions to the uploaded files/directories. Local_enable=YES -> Allow local users to login through FTP. write_enable=YES -> Allow the FTP users to write files to the FTP server.Ĭhroot_local_user=YES -> Prevent the FTP users from browsing outside their own home directory. After opening the configuration file, you can search for the below settings, uncomment them and ensure that they have the right value. Open the vsftpd configuration file using your favorite editor here we are going to use the vi editor. First and before editing the vsftpd configuration file, we need to take a backup from this configuration file. Some other few configurations needed to be done by editing the vsftpd configuration file which is found in “/etc/nf.” To ensure that all of the previous rules have been added successfully, you can check the status of the firewall by running the below command: sudo ufw status Configure the vsftpd Configuration File Now let’s enable the firewall if it is not already enabled. sudo ufw allow 40000:50000/tcp Add Rule For Passive FTP Port Also lets open the ports for the passive FTP. You may find the rule already added as the below output: Add A Rule For Port 21 The output of the previous command should be something like the below screenshot: Add Rule For Port 20 sudo ufw allow 21/tcp Now let’s open the 20 and 21 ports for FTP. sudo ufw allow sshĪs you can, the output of the previous command will be something like the below screenshot: Add A Rule For The SSH One of the basic configurations is adding a rule for the SSH, and this will prevent you from being locked out of by the server. Configure The FirewallĪfter installing the required FTP server package, we need to perform some more configurations on the firewall. In case you need the vsftpd service to run automatically when the system starts up, you can use the command: sudo service vsftpd enable sudo service vsftpd status Check The vsftpd Service StatusĪs you can see from the above screenshot that the FTP server is active and running successfully. sudo apt-get install vsftpd Install The vsftpd Package On Ubuntu Install the vsftpd package using the below command.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |